Authentication - Generate access token

Generates an access token required for accessing few partner api resources. This is the current version of the API, please discontinue using the older version which is getting deprecated- Generate Access Token (Deprecating)

POST https://api.partnercenter.microsoft.com/v3/generatetoken

Request Header

Media Types: "application/json", "application/xml", "text/xml", "application/x-www-form-urlencoded", "text/json"

Name Required Type Description
Authorization True

string

Authorization Bearer token. Only takes token with audience api.partnercenter.microsoft.com for app-only scenario. Refer Deprecation of Active directory graph token for detailed information.

Accept True

string

Acceptable content type; widely accepeted type application/json

ms-correlationid

string

Used for tracking requests internally. If a ms-correlationid is not provided, the server will generate a new one for each request

ms-requestid

string

Used for idempotency of requests. If a ms-requestid is not provided, the server will generate a new one for each request

Request Body

Media Types: "application/json", "application/xml", "text/xml", "application/x-www-form-urlencoded", "text/json"

Name Type Description
grant_type

string

Only supports grant_type=jwt_token

Responses

Name Type Description
200 OK

The request succeeded.

Media Types: "application/json", "application/xml", "text/xml", "text/json"

400 Bad Request

There was missing or invalid input. The response body contains the error details.

Media Types: "application/json", "application/xml", "text/xml", "text/json"

401 Unauthorized

The request was not authenticated. The client needs to authenticate with the partner API service first.

Media Types: "application/json", "application/xml", "text/xml", "text/json"

403 Forbidden

The request was authenticated but was refused because the caller does not have the rights to invoke it.

Media Types: "application/json", "application/xml", "text/xml", "text/json"

404 Not Found

The resource is not found or not available with the given input parameters.

Media Types: "application/json", "application/xml", "text/xml", "text/json"

500 Internal Server Error

The partner API service or one of its dependencies failed to fulfill the request. Callers can retry the request.

Media Types: "application/json", "application/xml", "text/xml", "text/json"