Skip to content

Latest commit

 

History

History
144 lines (104 loc) · 4.93 KB

companysubscription-get.md

File metadata and controls

144 lines (104 loc) · 4.93 KB
title description ms.localizationpriority author ms.subservice doc_type
Get companySubscription
Get a specific commercial subscription that an organization acquired.
medium
arp19690
entra-directory-management
apiPageType

Get companySubscription

Namespace: microsoft.graph

Get a specific commercial subscription that an organization acquired.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

GET /directory/subscriptions/{id}
GET /directory/subscriptions(commerceSubscriptionId='{commerceSubscriptionId}')

Optional query parameters

This method supports the $select OData query parameter to help customize the response.

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a companySubscription object in the response body.

Example

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/directory/subscriptions/f9c1ea2d-2c6e-4717-8c3b-7130812d70ba

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]



Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 450

{
  "createdDateTime": "2023-01-01T00:00:00Z",
  "commerceSubscriptionId": "f9c1ea2d-2c6e-4717-8c3b-7130812d70ba",
  "id": "860697e3-b0aa-4196-a6c6-7ec361ed58f7",
  "isTrial": false,
  "nextLifecycleDateTime": "2023-02-01T00:00:00Z",
  "serviceStatus": [
    {
      "appliesTo": "User",
      "provisioningStatus": "Success",
      "servicePlanId": "8b8269e5-f841-416c-ab3a-f5dfb9737986",
      "servicePlanName": "MyPlanName"
    }
  ],
  "skuId": "0816ccb9-3785-4d19-bf78-6c53e2106509",
  "skuPartNumber": "MyPartNumber",
  "status": "Enabled",
  "totalLicenses": 25,
  "ownerId": "fe04f19f-d924-42b7-9dee-edf4e3fab7f6",
  "ownerTenantId": "331af819-4e0b-49f7-a6bf-14e1165ad3a0",
  "ownerType": "User"
}