Skip to content

Latest commit

 

History

History
311 lines (255 loc) · 10.8 KB

File metadata and controls

311 lines (255 loc) · 10.8 KB
title List allotments
description Get a list of the allotment objects and their properties.
author patrick-starrin
ms.date 07/18/2025
ms.localizationpriority medium
ms.subservice cloud-licensing
doc_type apiPageType

List allotments

Namespace: microsoft.graph.cloudLicensing

[!INCLUDE beta-disclaimer]

Get a list of the allotment objects and their properties.

[!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 /admin/cloudLicensing/allotments

Optional query parameters

This method supports the $select, $top, $expand, $apply, and $filter OData query parameters to help customize the response. For general information, see OData query parameters.

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 collection of microsoft.graph.cloudLicensing.allotment objects in the response body.

Examples

Example 1: Get allotments

The following example shows how to get allotment objects.

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/admin/cloudLicensing/allotments

[!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

{
  "value": [
    {
      "@odata.type": "#microsoft.graph.cloudLicensing.allotment",
      "id": "551f1755-0184-9e51-0bc7-f32bae5a1afb",
      "allottedUnits": 250,
      "assignableTo": "user,group",
      "consumedUnits": 224,
      "services": [
        {
          "@odata.type": "microsoft.graph.cloudLicensing.service",
          "assignableTo": "user,group",
          "planId": "9aaf7827-d63c-4b61-89c3-182f06f82e5c",
          "planName": "EXCHANGE_S_STANDARD"
        },
        {
          "@odata.type": "microsoft.graph.cloudLicensing.service",
          "assignableTo": "none",
          "planId": "6f23d6a9-adbf-481c-8538-b4c095654487",
          "planName": "M365_LIGHTHOUSE_CUSTOMER_PLAN1"
        },
        {
          "@odata.type": "microsoft.graph.cloudLicensing.service",
          "assignableTo": "none",
          "planId": "882e1d05-acd1-4ccb-8708-6ee03664b117",
          "planName": "INTUNE_O365"
        },
        {
          "@odata.type": "microsoft.graph.cloudLicensing.service",
          "assignableTo": "user,group",
          "planId": "5e62787c-c316-451f-b873-1d05acd4d12c",
          "planName": "BPOS_S_TODO_1"
        }
      ],
      "skuId": "4b9405b0-7788-4568-add1-99614e613b69",
      "skuPartNumber": "EXCHANGESTANDARD"
    }
  ]
}

Example 2: Get allotments with waitingMembers

The following example shows how to get allotment objects, including their waitingMembers.

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/admin/cloudLicensing/allotments?$select=id,allottedUnits,consumedUnits,assignableTo&$expand=waitingMembers($select=id,waitingSinceDateTime)

[!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

{
  "value": [
    {
      "@odata.type": "#microsoft.graph.cloudLicensing.allotment",
      "id": "551f1755-0184-9e51-0bc7-f32bae5a1afb",
      "allottedUnits": 250,
      "assignableTo": "user,group",
      "consumedUnits": 224,
      "waitingMembers": [
        {
          "@odata.type": "#microsoft.graph.cloudLicensing.waitingMember",
          "id": "49caea1b-ad15-64f1-70c5-5c5e3563d19c",
          "waitingSinceDateTime": "2024-11-22T17:11:10.6635939+00:00"
        }
      ]
    }
  ]
}

Example 3: Get allotments and aggregate allotted units

The following example shows how to get allotment objects and aggregate allotted units.

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/admin/cloudLicensing/allotments?$apply=groupby((skuId,skuPartNumber), aggregate(allottedUnits with sum as totalAllottedUnits, consumedUnits with sum as totalConsumedUnits))

[!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

{
  "value": [
    {
      "skuId": "6fd2c87f-b296-42f0-b197-1e91e994b900",
      "skuPartNumber": "ENTERPRISEPACK",
      "totalAllottedUnits": 500,
      "totalConsumedUnits": 425
    },
    {
      "skuId": "c7df2760-2c81-4ef7-b578-5b5392b571df",
      "skuPartNumber": "ENTERPRISEPREMIUM",
      "totalAllottedUnits": 200,
      "totalConsumedUnits": 150
    },
    {
      "skuId": "a4585165-0533-458a-97e3-c400570268c4",
      "skuPartNumber": "SHAREPOINTSTANDARD",
      "totalAllottedUnits": 300,
      "totalConsumedUnits": 275
    }
  ]
}