GetAuthTokenAPI

POST {{baseUrl}}

This request uses the tenantIdAPIBlob, clientIdAPIBlob and clientSecretAPIBlob and generates an access token using OAuth2. This request also stores the access key in bearerTokenAPI.

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"=>"{{clientIdAPIBlob}}", "datatype"=>"string"}, {"name"=>"client_secret", "value"=>"{{clientSecretAPIBlob}}", "datatype"=>"string"}, {"name"=>"resource", "value"=>"https://management.azure.com/", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
x-mock-response-namestring

RESPONSES

status: OK

{"token_type":"Bearer","expires_in":"0000","ext_expires_in":"0000","expires_on":"0000","not_before":"0000","resource":"https://storage.azure.com/","access_token":"sampleBearerToken"}