Microsoft Dynamics Authentication

Authenticates against Microsoft Dynamics 365 and returns an access token and ready-to-use authorization headers. Run it before any other Dynamics action that needs an authenticated request.

What it does

  • Requests an access token from Microsoft using your tenant and application credentials.
  • Supports both API version 1 and version 2 of the Microsoft token endpoint.
  • Returns the access token and a pre-built Authorization: Bearer header for downstream calls.
  • Reports whether authentication succeeded through the Success flag.

Inputs

NameTypeDescription
ResourceOptional StringMicrosoft Dynamics resource e.g. https://{domain}.operations.dynamics.com
ScopeOptional StringMicrosoft Dynamics scope
Tenant IDStringMicrosoft Dynamics tenant id
API VersionStringMicrosoft Dynamics API version Possible values: 1, 2.
Client IDString (sensitive)Microsoft Dynamics client id
Client SecretString (sensitive)Microsoft Dynamics client secret

Outputs

NameTypeDescription
SuccessBooleanWhether successfully authenticated
Access TokenStringAccess Token
HeadersObjectAuthorization Bearer token

Notes

  • Use API version 1 for the classic oauth2/token endpoint and version 2 for the oauth2/v2.0/token endpoint.
  • Resource and Scope are optional and only sent when provided; which one you need depends on the token endpoint version.

API reference