Set up OAuth 2.0 Connection to Dynamics

PLEASE NOTE: OAuth authentication will not work if multi-factor authentication is enabled.

 On Azure

  1. Go to your Azure portal, select Azure Active Directory

    Oauth1

  2. Click App registration and create a new registration

    Oauth2

  3. Register a new app. Give it a name and ensure you enter a Redirect URI for a secure page that is using https.

    Oauth3

  4. Click Authentication on side nav, check Access tokens and save the configuration.

    Oauth4

  5. Click API permission on side nav in order to add a permission and ensure to enable user_impersonation.

    Oauth5

  6. Click Manifest and set AllowPublicClient to true.
  7. Oauth6

On Postman

  1. Create a token on the downloaded version of Postman. Once the app is opened, open a new tab and select authorization. Under the TYPE dropdown, select OAuth 2.0 as your type.

    Oauth7

  2. On the right pane, scroll down to Configure New Token and enter the name of your token, specify grant type as implicit grant, and paste your Callback Url and Auth Url.
  3. Note: The Callback URL is your Redirect URI on Azure. The Auth URL takes a query string parameter of your Dynamics CRM link and is formatted as such:

    https://login.microsoftonline.com/{tenantId}/oauth2/authorize?resource=https://orgname.crm.dynamics.com

    Oauth8a

    Oauth8b

  4. Click Get new Access Token

On the popup, sign in to your MS account and agree to terms.

Oauth9

On TPC

Go to The Portal Connector Configuration under Administration menu. Specify the Connection Type as OAuth and fill in the fields. Save and Test Connection:

Oauth10