...
Save the secret value somewhere it will not be accessible later.
3. Add permissions.
4. Get clientID and tenantID
Required scopes
"https://outlook.office365.com/IMAP.AccessAsUser.All"
"https://outlook.office365.com/Mail.Read"
"https://outlook.office365.com/Mail.ReadBasic"
"https://outlook.office365.com/User.Read"