Configuring OAuth for EWS Server


Steps to configure OAuth for EWS Server:

  1. Log in to portal.azure.com.

    Applications Manager Configuring OAuth for EWS Server: Logging into Azure portal

  2. Under Azure services, navigate to App registrations -> New registration.

    Applications Manager Configuring OAuth for EWS Server: Adding new app registration in Azure portal

  3. In the displayed page, enter a Name of your choice and choose the Supported account types.
  4. In the Redirect URI field, copy-paste the Redirect URL of APM.

    Applications Manager Configuring OAuth for EWS Server: Specifying Redirect URI in Azure portal

  5. In the next page, you will find the application details. Copy the Client ID to APM.

    Applications Manager Configuring OAuth for EWS Server: Copying client ID from Azure portal

  6. Click on Endpoints to open the right panel containing all endpoints.
  7. Copy OAuth 2.0 authorization endpoint (v2) and OAuth 2.0 token endpoint (v2) to Authorization URL and Token URL in APM respectively.

    Applications Manager Configuring OAuth for EWS Server: Copying authorization and token endpoints from Azure portal

  8. From the left panel, navigate to Certificates & secrets -> New client secret.

    Applications Manager Configuring OAuth for EWS Server: Adding new client secret in Azure portal

  9. In the displayed page, provide a Description for the client secret.
  10. Under Expires, choose the validity of the client secret and click on Add.

    Applications Manager Configuring OAuth for EWS Server: Specifying validity of client secret in Azure portal

  11. You will find the client secret generated. Copy it to the Client Secret in APM.

    Applications Manager Configuring OAuth for EWS Server: Copying client secret from Azure portal

  12. In the left panel, navigate to API Permission -> Add a permission.
  13. From the right panel that pops up, click on APIs my organization uses. Enter Office 365 in the search bar and select Office 365 Exchange Online from the displayed list of APIs.

    Applications Manager Configuring OAuth for EWS Server: Requesting API permissions for Office 365 in Azure portal

  14. Choose Delegated Permissions -> EWS and enable the checkbox to add the corresponding permission.

    Applications Manager Configuring OAuth for EWS Server: Enabling delegated permissions for EWS in Azure portal

  15. Click on Grant admin consent for <application name>. A confirmation window will be displayed. Click Yes to proceed.

    Applications Manager Configuring OAuth for EWS Server: Granting admin consent for application in Azure portal

You have now configured Microsoft Azure as the authorization server for your organization using Microsoft Outlook as the mail server.

Note:
Use the following values to configure OAuth setup for EWS Server:
  • Scope :
    EWS.AccessAsUser.All
    offline_access
  • Token Request Method :Post request body

Applications Manager Configuring OAuth for EWS Server: Adding OAuth provider for EWS

Thank you for your feedback!

Was this content helpful?

We are sorry. Help us improve this page.

How can we improve this page?
Do you need assistance with this topic?
By clicking "Submit", you agree to processing of personal data according to the Privacy Policy.