skip to main content
Configuring and connecting to data sources : Authentication : OAuth 2.0 authentication : Obtaining application client information and endpoints
  

Try DataDirect Drivers Now
Obtaining application client information and endpoints
You must obtain the following client information and endpoints in order to retrieve the OAuth tokens necessary for connecting to a Dynamics 365 service.
*Client ID: The client ID for your application
*Client Secret: The client secret for your application
*Authorization URI: The endpoint for obtaining an authorization code from the Azure authorization service
*Token URI: The endpoint used to exchange authentication credentials for access tokens
Take the following steps to obtain application client information and endpoints.
1. Go to the Azure portal.
https://portal.azure.com
2. Select Azure Active Directory.
3. Select App registrations on the left.
4. Select the app that you have created.
5. From the app overview page, record the ClientID.
6. Obtain your ClientSecret.
a. Select Certificates & secrets.
b. Click New client secret.
c. Enter description and choose an expiry option.
d. Click Add.
e. Copy the ClientSecret to a secure location.
7. Obtain authorization URI and token URI endpoints.
a. Return to the Overview page for your application.
b. Click Endpoints to display authorization and token endpoints associated with the application.
Dynamics 365 supports two different APIs to manage user and application permissions: Azure Active Directory (v1) and Microsoft Identity Platform (v2). As shown in the following examples, authorization and token endpoints have different formats, depending on which API you are using.
*Azure Active Directory (v1) authorization endpoint
https://login.microsoftonline.com/common/oauth2/authorize
*Microsoft Identity Platform (v2) authorization endpoint
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
c. Record the AuthURI.
*For v1, the AuthURI consists of the OAuth 2.0 authorization endpoint (v1) appended with ?resource=<resource_uri> where the <resource_uri> is the URI for your Dynamics 365 service. For example:
https://login.microsoftonline.com/common/oauth2/authorize?resource
=https://mywebinstance.api.crm.dynamics.com
*For v2, the AuthURI is the OAuth 2.0 authorization endpoint (v2). However, for v2, you must provide permissions via the Scope option. See "Determining the scope" for details.
d. Record the TokenURI.
*For v1, the TokenURI is the OAuth 2.0 token endpoint (v1).
*For v2, the TokenURI is the OAuth 2.0 token endpoint (v2).