skip to main content
Configuring and connecting to data sources : Authentication : OAuth 2.0 authentication : Access token flow
  

Try DataDirect Drivers Now
Access token flow
The access token flow passes the access token directly from the client to the Dynamics 365 service for authentication.
Note: On Windows platforms, as opposed to using a third-party application such as Postman, you can use the Progress DataDirect Dynamics 365 Configuration Manager to obtain an access token to support the access token flow. See "Obtaining access and refresh tokens using the Configuration Manager" for details.
Note: Access tokens are temporary and must be replaced to maintain the session without interruption. The life of an access token is typically one hour.
To configure the driver to use an access token flow:
*Set the Service URL (ServiceURL) options to the base URL of the Dynamics 365 instance to which you want to issue requests. For example, https://mywebinstance.api.crm.dynamics.com/api/data/v9.1/.
*Set the Authentication Method (AuthenticationMethod) option to 24 (OAuth2). Since 24 (OAuth2) is the default, this value does not have to be specified in a connection URL used for OAuth 2.0 implementations.
*Set the Access Token (AccessToken) options to the value of the access token obtained from external sources.
The following examples show the connection information required to establish a session using the access token flow.
Connection string
DRIVER=DataDirect 8.0 Microsoft Dynamics 365;
ServiceURL=https://mywebinstance.api.crm.dynamics.com/api/data/v9.1/;
AccessToken=C3TQH9zjwek4CgJCU-4Mxb2DxLNfI2LB3a-dNfpWYx;
odbc.ini file
[Microsoft Dynamics 365]
Driver=ODBCHOME/lib/ivdynamics36528.so
...
Description=DataDirect 8.0 MS Dynamics 365
...
AccessToken=C3TQH9zjwek4CgJCU-4Mxb2DxLNfI2LB3a-dNfpWYx
...
ServiceURL=https://mywebinstance.api.crm.dynamics.com/api/data/v9.1/
...