Generating an OAuth Token
Next, you will obtain an OAuth 2.0 token. Use the following details to request the token.
Token Request URL
POST https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded
client_id={client_id}&
client_secret={client_secret}&
grant_type=client_credentials&
scope={scope}
Example Response
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "eyJ0eXAiOiJKV... (truncated)"
}
The access_token above is used to authenticate API requests. You are now ready to make calls to the API.