synchronization: acquireAccessToken

Namespace: microsoft.graph

Acquire an OAuth Access token to authorize the Azure AD provisioning service to provision users into an application.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Synchronization.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Application.ReadWrite.OwnedBy, Synchronization.ReadWrite.All

To configure application provisioning or HR-driven provisioning, the calling user must also be assigned the Application Administrator or Cloud Application Administrator directory role.

To configure Azure AD Cloud Sync, the calling user must also be assigned the Hybrid Identity Administrator directory role.

HTTP request

POST /applications/{applicationsId}/synchronization/acquireAccessToken
POST /servicePrincipals/{servicePrincipalsId}/synchronization/acquireAccessToken

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, supply JSON representation of the parameters.

The following table shows the parameters that can be used with this action.

Parameter Type Description
credentials synchronizationSecretKeyStringValuePair collection Represents a single secret value.

Response

If successful, this action returns a 204 No Content response code.

Examples

Request

POST https://graph.microsoft.com/beta/applications/{applicationsId}/synchronization/acquireAccessToken
Content-Type: application/json

{
  "credentials": [
    {
      "@odata.type": "microsoft.graph.synchronizationSecretKeyStringValuePair"
    }
  ]
}

Response

HTTP/1.1 204 No Content