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) Directory.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Application.ReadWrite.OwnedBy, Directory.ReadWrite.All

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
Content-length: 123

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

Response

Note: The response object shown here might be shortened for readability.

HTTP/1.1 204 No Content