purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken
This endpoint is used to generate an SAS token to authenticate and access your Clawback event message queue. For more information on a Clawback event message queue, see Managing refunds and chargebacks from your service.
Prerequisites
To use this API, you must go through the on-boarding process with the assistance of your Developer Partner Manager or Microsoft contact.
- The Microsoft Entra application client ID your services will use for authenticating to the Microsoft Store Services and your products in Partner Center will be linked to (see Additional configuration required to view and manage products with a User Store ID / Microsoft Entra ID auth)
- The geographical region where you would prefer your Clawback event message queue to be hosted as to reduce latency.
As part of on-boarding an Azure Storage Queue will be set up and hosted by Microsoft as the Clawback event message queue. The on-boarding process may take up to two weeks depending on deployment schedules.
Note
If the product configuration has not been done and published through Partner Center, Clawback events for those products will not be written to the Azure Storage Queue.
Request
Request syntax
Method | Request URI |
---|---|
GET |
purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken |
Request header
Header | Type | Description |
---|---|---|
Authorization |
string |
Required. Your Microsoft Entra ID service access token in the form Bearer <token>. See Creating Microsoft Entra ID access tokens. |
Host |
string |
Must be set to the value purchase.mp.microsoft.com . |
Request example
POST https://purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken HTTP/1.1
Host: purchase.mp.microsoft.com
Authorization: Bearer [Microsoft Entra ID bearer token]
Response
Response body
The response body will be JSON and consist of the following values.
Parameter | Type | Description | Required |
---|---|---|---|
expiresOn |
DateTime |
The UTC date and time that the SAS token will expire | Yes |
uri |
string |
Combined Storage resource URI and SAS Token to access the Clawback Message Queue. | Yes |
Response Example
HTTP/1.1 200 OK
Date: Thu, 08 Dec 2022 20:13:46 GMT
Content-Length: 243
Content-Type: application/json; charset=utf-8
ms-correlationid: 70e6f659-ceee-4050-bdf3-56ea3beefe23
ms-requestid: 8c80d7ff-73e2-4a5c-9aca-79059fbc1beb
ms-cv: tRscYtHLJHps.0
x-content-type-options: nosniff
{
"expiresOn":"2022-12-09T02:13Z",
"uri":"https://uluufeofsxh2k.queue.core.windows.net:443/gxhxcvb32lnk4?sv=2021-10-04&spr=https&st=2022-12-08T20%3A13%3A46Z&se=2022-12-09T02%3A13%3A46Z&sp=rp&sig=OneHfX99E820avICZvXJUF14IyDuv2BrvY0kj%2Ftxc70%3D"
}
Using the SAS token to access the Clawback event message queue
Once you have the uri parameter, you can access the messages in the queue.
See Processing Clawback messages from the queue for more information.
Related topics
Managing refunds and chargebacks from your service
Managing consumable products from your service
Manage products from your services