GetOAuthAccessToken
Retrieves the OAuth access token needed for authenticating API requests to the service. This token is essential for maintaining secure communication.
Input
| Name | Type | Description |
| AuthMode | String | Specifies the authentication type. Use 'App' for Windows applications or 'Web' for browser-based authentication.
The default value is APP. |
| Verifier | String | The verifier token returned by the service, required to obtain the access token when using Web authentication. This token is retrieved by navigating to the URL returned in GetOAuthAuthorizationUrl. |
| CallbackUrl | String | The URL where users are redirected after authorizing the application. It must match the Reply URL configured in the Azure AD app settings. |
| State | String | A value that helps maintain state between request and response. This parameter makes a round trip to the Dynamics authorization server and back. It can be used to redirect users to the correct resource, implement nonces, or mitigate cross-site request forgery attacks. |
| Prompt | String | Defines the authentication prompt behavior. Defaults to 'select_account' (prompts users to choose an account). Other options: 'None' (no prompt), 'login' (forces credential entry), or 'consent' (triggers the OAuth consent dialog for permissions approval). |
Result Set Columns
| Name | Type | Description |
| OAuthAccessToken | String | The OAuth access token used for authentication and API requests. |
| OAuthRefreshToken | String | A token used to obtain a new access token without requiring user interaction. |
| ExpiresIn | String | The duration (in seconds) until the access token expires. |