EWS - Authorize the Connection
Enable OAuth 2.0 Authentication
Enable the “Use OAuth 2.0 Authentication” checkbox in both the Incoming and Outgoing email server settings and click “Manage Token”
Both incoming and outgoing email servers can use the same token but each must be authorized separately to establish the respective connections
Set the following values in the OAuth Token Details form
Type: Microsoft Graph API
Grant Type: authorization_code
Callback URL: Error! Hyperlink reference not valid.
Authorization URL: https://login.microsoftonline.com/{Azure Tenant ID}/oauth2/v2.0/authorize
Access Token URL: https://login.microsoftonline.com/{Azure Tenant ID}/oauth2/v2.0/token
Client ID: Value from the Azure App Registration
Client Secret: The secret created for the App Registration
The following scopes are required:
https://outlook.office365.com/Mail.ReadWrite
https://outlook.office365.com/Mail.Send
https://outlook.office365.com/User.Read
https://outlook.office365.com/EWS.AccessAsUser.All offline_access
The following scopes must be used if you intend to use a shared mailbox
https://outlook.office365.com/Mail.ReadWrite
https://outlook.office365.com/Mail.Send
https://outlook.office365.com/User.Read
https://outlook.office365.com/Mail.ReadWrite.Shared
https://outlook.office365.com/Mail.Send.Shared
https://outlook.office365.com/EWS.AccessAsUser.All offline_access
Corresponding permissions for these scopes may need to be added manually to the App Registration.
Click 'Authorize'
A pop up window will appear for you to enter the Exchange credentials and then authorize the connection
When the authorization process is complete, the popup will close. The OAuth Token Details dialog should close shortly thereafter.
Last updated