Training
Module
Plan and implement entitlement management - Training
When new users or external users join your site, quickly assigning them access to Azure solutions is a must. Explore how to entitle users to access your site and resources.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: Partner Center | Partner Center operated by 21Vianet | Partner Center for Microsoft Cloud for US Government
Partners can view their Azure entitlement for a subscription by using this API, which gets the entitlement of the subscription identifier for a customer.
To cancel an Azure subscription, you'll need to identify your customer ID, subscription ID, and entitlement ID for the Azure subscription you want to cancel.
To get a customer, refer to Get a customer by ID and Get customer by customer ID - REST API for more help.
To get a subscription, refer to Get a subscription by ID and Get subscription by ID - REST API for more help.
To get an entitlement, refer to Get an Azure entitlement for a subscription - REST API.
Method | Request URI |
---|---|
POST | {baseURL}/v1/customers/{customer_id}/subscriptions/{subscription_id}/azureEntitlements/{entitlement_id} HTTP/1.1 |
This table lists the required query parameters to cancel an Azure subscription.
Name | Type | Required | Description |
---|---|---|---|
customer_id | String | Y | The value is a string that denotes the identifier of the customer. |
subscription_id | String | Y | The value is a string that denotes the identifier of the customer. |
entitlement_id | String | Y | The value is a string that denotes the identifier of the Azure subscription entitlement. |
See Partner Center REST headers.
No request body is required.
GET https://api.partnercenter.microsoft.com/v1/customers/{customer_id}/subscriptions/{subscription_id}/azureEntitlements/{entitlement_id}
HTTP/1.1
Accept: application/json
MS-RequestId: 655890ba-4d2b-4d09-a95f-4ea1348686a5
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
If successful, this method returns an Azure entitlement for a subscription resource in the response body.
Each response comes with an HTTP status code that indicates success or failure and more debugging information. Use a network trace tool to read this code, error type, and other parameters. For the full list, see Partner Center REST error codes.
HTTP Status | HTTP Code | Error code | Description |
---|---|---|---|
BadRequest | 400 | 900118 | Invalid customer ID. |
BadRequest | 400 | 800002 | Customer ID {0} should have GUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). |
BadRequest | 400 | 800002 | Subscription ID is required. |
BadRequest | 400 | 800002 | Entitlement ID is required. |
BadRequest | 400 | 800002 | The Azure entitlement cancellation request content is required. |
Forbidden | 403 | 900159 | The partner with account ID {0} and organization ID {1} has no commerce relationship with the customer with account ID {2} and organization ID {3}. |
BadRequest | 400 | 900307 | Cancellation reason '{0} is invalid. |
NotFound | 404 | 800111 | Azure entitlement with ID {0} isn't found. |
The response returns the Azure entitlement for a given customer.
HTTP
HTTP/1.1 200 OK
Content-Length: 1132
Content-Type: application/json; charset=utf-8
MS-CorrelationId: bbbb1111-cc22-3333-44dd-555555eeeeee
MS-RequestId: 22bfd0fb-d1e6-4a8f-aa1a-124b7c820d80
MS-CV: cmde2DtbuUWi8JLq.0
MS-ServerId: 201022015
Date: Wed, 14 Dec 2022 00:12:53 GMT
{
"id": "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f",
"friendlyName": " Cancel_Azure_Subscription",
"status": “inactive",
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"links": {
"self": {
"uri": "/customers/aaaabbbb-0000-cccc-1111-dddd2222eeee/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/azureEntitlements/bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f",
"method": "GET",
"headers": []
}
}
Training
Module
Plan and implement entitlement management - Training
When new users or external users join your site, quickly assigning them access to Azure solutions is a must. Explore how to entitle users to access your site and resources.