GetAuthTokenAD
POST {{baseAuth}}/{{tenantIdFlow}}/oauth2/token
This request uses the tenantIdFlow
, clientIdFlow
and clientSecretFlow
and generates an access token using OAuth2. This request also stores the access key in bearerTokenFlow
.
The baseAuth
allows the switching of this request from a regular POST request (which would use https://login.microsoftonline.com) to an example generated through the Mock Server (which would use the Mock Server URL).
Request Body
[{"name"=>"grant_type", "value"=>"client_credentials", "datatype"=>"string"}, {"name"=>"client_id", "value"=>"{{clientIdFlow}}", "datatype"=>"string"}, {"name"=>"client_secret", "value"=>"{{clientSecretFlow}}", "datatype"=>"string"}, {"name"=>"resource", "value"=>"https://graph.microsoft.com/", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
x-mock-response-name | string |
RESPONSES
status: OK
{"token_type":"Bearer","expires_in":"0000","ext_expires_in":"0000","expires_on":"0000","not_before":"0000","resource":"https://graph.microsoft.com/","access_token":"sample-alpha-numeric-access-token"}