|
| 1 | +--- |
| 2 | +title: "List allotments" |
| 3 | +description: "Get a list of the allotment objects and their properties." |
| 4 | +author: "patrick-starrin" |
| 5 | +ms.date: 07/18/2025 |
| 6 | +ms.localizationpriority: medium |
| 7 | +ms.subservice: "cloud-licensing" |
| 8 | +doc_type: apiPageType |
| 9 | +--- |
| 10 | + |
| 11 | +# List allotments |
| 12 | + |
| 13 | +Namespace: microsoft.graph.cloudLicensing |
| 14 | + |
| 15 | +[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)] |
| 16 | + |
| 17 | +Get a list of the [allotment](../resources/cloudlicensing-allotment.md) objects and their properties. |
| 18 | + |
| 19 | +## Permissions |
| 20 | + |
| 21 | +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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference). |
| 22 | + |
| 23 | +<!-- { |
| 24 | + "blockType": "permissions", |
| 25 | + "name": "cloudlicensing-admincloudlicensing-list-allotments-permissions" |
| 26 | +} |
| 27 | +--> |
| 28 | +[!INCLUDE [permissions-table](../includes/permissions/cloudlicensing-admincloudlicensing-list-allotments-permissions.md)] |
| 29 | + |
| 30 | +## HTTP request |
| 31 | + |
| 32 | +<!-- { |
| 33 | + "blockType": "ignored" |
| 34 | +} |
| 35 | +--> |
| 36 | +``` http |
| 37 | +GET /admin/cloudLicensing/allotments |
| 38 | +``` |
| 39 | + |
| 40 | +## Optional query parameters |
| 41 | + |
| 42 | +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](/graph/query-parameters). |
| 43 | + |
| 44 | +## Request headers |
| 45 | + |
| 46 | +|Name|Description| |
| 47 | +|:---|:---| |
| 48 | +|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).| |
| 49 | + |
| 50 | +## Request body |
| 51 | + |
| 52 | +Don't supply a request body for this method. |
| 53 | + |
| 54 | +## Response |
| 55 | + |
| 56 | +If successful, this method returns a `200 OK` response code and a collection of [microsoft.graph.cloudLicensing.allotment](../resources/cloudlicensing-allotment.md) objects in the response body. |
| 57 | + |
| 58 | +## Examples |
| 59 | + |
| 60 | +### Example 1: Get allotments |
| 61 | +The following example shows how to get [allotment](../resources/cloudlicensing-allotment.md) objects. |
| 62 | +#### Request |
| 63 | + |
| 64 | +The following example shows a request. |
| 65 | +<!-- { |
| 66 | + "blockType": "request", |
| 67 | + "name": "list_admin_assignment_allotment" |
| 68 | +} |
| 69 | +--> |
| 70 | +``` http |
| 71 | +GET https://graph.microsoft.com/beta/admin/cloudLicensing/allotments |
| 72 | +``` |
| 73 | + |
| 74 | +#### Response |
| 75 | + |
| 76 | +The following example shows the response. |
| 77 | +>**Note:** The response object shown here might be shortened for readability. |
| 78 | +<!-- { |
| 79 | + "blockType": "response", |
| 80 | + "truncated": true, |
| 81 | + "@odata.type": "Collection(microsoft.graph.cloudLicensing.allotment)" |
| 82 | +} |
| 83 | +--> |
| 84 | +``` http |
| 85 | +HTTP/1.1 200 OK |
| 86 | +Content-Type: application/json |
| 87 | +
|
| 88 | +{ |
| 89 | + "value": [ |
| 90 | + { |
| 91 | + "@odata.type": "#microsoft.graph.cloudLicensing.allotment", |
| 92 | + "id": "551f1755-0184-9e51-0bc7-f32bae5a1afb", |
| 93 | + "allottedUnits": 250, |
| 94 | + "assignableTo": "user,group", |
| 95 | + "consumedUnits": 224, |
| 96 | + "services": [ |
| 97 | + { |
| 98 | + "@odata.type": "microsoft.graph.cloudLicensing.service", |
| 99 | + "assignableTo": "user,group", |
| 100 | + "planId": "9aaf7827-d63c-4b61-89c3-182f06f82e5c", |
| 101 | + "planName": "EXCHANGE_S_STANDARD" |
| 102 | + }, |
| 103 | + { |
| 104 | + "@odata.type": "microsoft.graph.cloudLicensing.service", |
| 105 | + "assignableTo": "none", |
| 106 | + "planId": "6f23d6a9-adbf-481c-8538-b4c095654487", |
| 107 | + "planName": "M365_LIGHTHOUSE_CUSTOMER_PLAN1" |
| 108 | + }, |
| 109 | + { |
| 110 | + "@odata.type": "microsoft.graph.cloudLicensing.service", |
| 111 | + "assignableTo": "none", |
| 112 | + "planId": "882e1d05-acd1-4ccb-8708-6ee03664b117", |
| 113 | + "planName": "INTUNE_O365" |
| 114 | + }, |
| 115 | + { |
| 116 | + "@odata.type": "microsoft.graph.cloudLicensing.service", |
| 117 | + "assignableTo": "user,group", |
| 118 | + "planId": "5e62787c-c316-451f-b873-1d05acd4d12c", |
| 119 | + "planName": "BPOS_S_TODO_1" |
| 120 | + } |
| 121 | + ], |
| 122 | + "skuId": "4b9405b0-7788-4568-add1-99614e613b69", |
| 123 | + "skuPartNumber": "EXCHANGESTANDARD" |
| 124 | + } |
| 125 | + ] |
| 126 | +} |
| 127 | +``` |
| 128 | + |
| 129 | +### Example 2: Get allotments with waitingMembers |
| 130 | +The following example shows how to get [allotment](../resources/cloudlicensing-allotment.md) objects, including their **waitingMembers**. |
| 131 | +#### Request |
| 132 | + |
| 133 | +The following example shows a request. |
| 134 | +<!-- { |
| 135 | + "blockType": "request", |
| 136 | + "name": "list_admin_assignment_allotment_with_waitingmembers" |
| 137 | +} |
| 138 | +--> |
| 139 | +``` http |
| 140 | +GET https://graph.microsoft.com/beta/admin/cloudLicensing/allotments?$select=id,allottedUnits,consumedUnits,assignableTo&$expand=waitingMembers($select=id,waitingSinceDateTime) |
| 141 | +``` |
| 142 | + |
| 143 | +#### Response |
| 144 | + |
| 145 | +The following example shows the response. |
| 146 | +>**Note:** The response object shown here might be shortened for readability. |
| 147 | +<!-- { |
| 148 | + "blockType": "response", |
| 149 | + "truncated": true, |
| 150 | + "@odata.type": "Collection(microsoft.graph.cloudLicensing.allotment)" |
| 151 | +} |
| 152 | +--> |
| 153 | +``` http |
| 154 | +HTTP/1.1 200 OK |
| 155 | +Content-Type: application/json |
| 156 | +
|
| 157 | +{ |
| 158 | + "value": [ |
| 159 | + { |
| 160 | + "@odata.type": "#microsoft.graph.cloudLicensing.allotment", |
| 161 | + "id": "551f1755-0184-9e51-0bc7-f32bae5a1afb", |
| 162 | + "allottedUnits": 250, |
| 163 | + "assignableTo": "user,group", |
| 164 | + "consumedUnits": 224, |
| 165 | + "waitingMembers": [ |
| 166 | + { |
| 167 | + "@odata.type": "#microsoft.graph.cloudLicensing.waitingMember", |
| 168 | + "id": "49caea1b-ad15-64f1-70c5-5c5e3563d19c", |
| 169 | + "waitingSinceDateTime": "2024-11-22T17:11:10.6635939+00:00" |
| 170 | + } |
| 171 | + ] |
| 172 | + } |
| 173 | + ] |
| 174 | +} |
| 175 | +``` |
| 176 | + |
| 177 | +### Example 3: Get allotments and aggregate allotted units |
| 178 | + |
| 179 | +The following example shows how to get [allotment](../resources/cloudlicensing-allotment.md) objects and aggregate allotted units. |
| 180 | + |
| 181 | +#### Request |
| 182 | +The following example shows a request. |
| 183 | +<!-- { |
| 184 | + "blockType": "request", |
| 185 | + "name": "list_admin_assignment_allotment_and_aggregate_allotted_units" |
| 186 | +} |
| 187 | +--> |
| 188 | +``` http |
| 189 | +GET https://graph.microsoft.com/beta/admin/cloudLicensing/allotments?$apply=groupby((skuId,skuPartNumber), aggregate(allottedUnits with sum as totalAllottedUnits, consumedUnits with sum as totalConsumedUnits)) |
| 190 | +``` |
| 191 | + |
| 192 | +#### Response |
| 193 | + |
| 194 | +The following example shows the response. |
| 195 | +>**Note:** The response object shown here might be shortened for readability. |
| 196 | +<!-- { |
| 197 | + "blockType": "response", |
| 198 | + "truncated": true, |
| 199 | + "@odata.type": "Collection(microsoft.graph.cloudLicensing.allotment)" |
| 200 | +} |
| 201 | +--> |
| 202 | +``` http |
| 203 | +HTTP/1.1 200 OK |
| 204 | +Content-Type: application/json |
| 205 | +
|
| 206 | +{ |
| 207 | + "value": [ |
| 208 | + { |
| 209 | + "skuId": "6fd2c87f-b296-42f0-b197-1e91e994b900", |
| 210 | + "skuPartNumber": "ENTERPRISEPACK", |
| 211 | + "totalAllottedUnits": 500, |
| 212 | + "totalConsumedUnits": 425 |
| 213 | + }, |
| 214 | + { |
| 215 | + "skuId": "c7df2760-2c81-4ef7-b578-5b5392b571df", |
| 216 | + "skuPartNumber": "ENTERPRISEPREMIUM", |
| 217 | + "totalAllottedUnits": 200, |
| 218 | + "totalConsumedUnits": 150 |
| 219 | + }, |
| 220 | + { |
| 221 | + "skuId": "a4585165-0533-458a-97e3-c400570268c4", |
| 222 | + "skuPartNumber": "SHAREPOINTSTANDARD", |
| 223 | + "totalAllottedUnits": 300, |
| 224 | + "totalConsumedUnits": 275 |
| 225 | + } |
| 226 | + ] |
| 227 | +} |
| 228 | +``` |
0 commit comments