Question:
In the Microsoft Admin Portal, under Your Products, I can see the list of subscriptions along with details like assigned licenses, purchased licenses, and available licenses. If the same product is part of multiple subscriptions, it correctly displays them as separate subscriptions with their respective details.
However, when I call the Company Subscriptions API: 🔗 https://graph.microsoft.com/v1.0/directory/subscriptions/
I get the following response:
{
"createdDateTime": "2024-09-XXTXX:XX:XXZ",
"commerceSubscriptionId": "7e718d7f-xxxx-xxxx-xxxx-xxxxxxxx6ad1",
"id": "8c6fe79e-fcf7-xxxx-xxxx-0eff31d6c2e6",
"isTrial": false,
"nextLifecycleDateTime": "2025-09-XXTXX:XX:XXZ",
"skuId": "18181a46-0d4e-45cd-891e-60aabd171b4e",
"skuPartNumber": "STANDARDPACK",
"status": "Enabled",
"totalLicenses": 20
}
{
"createdDateTime": "2024-08-XXTXX:XX:XXZ",
"commerceSubscriptionId": "55ce5e0c-80f2-xxxx-xxxx-8cbd7911cc70",
"id": "c46a342f-c520-xxxx-xxxx-87f5c4e50a44",
"isTrial": false,
"nextLifecycleDateTime": "2025-08-XXTXX:XX:XXZ",
"skuId": "18181a46-0d4e-45cd-891e-60aabd171b4e",
"skuPartNumber": "STANDARDPACK",
"status": "Enabled",
"totalLicenses": 729
}
The issue is this API does not return assigned licenses or available licenses, which are visible in the Admin Portal.
Additionally, when I call the User License Details API:
"value": [
{
"id": "I02B9DU4h02n3FxxxxxxxqJMjIx6kH_WwjU",
"skuId": "18181a46-0d4e-45cd-891e-60aabd171b4e",
"skuPartNumber": "STANDARDPACK",
"servicePlans": []
}
]
This response also does not indicate which subscription a user’s assigned license is coming from, even when there are multiple subscriptions for the same SKU.
My Question:
Since the Admin Portal is displaying this data, Microsoft must be maintaining this information internally. How can we retrieve assigned licenses per subscription using the Microsoft Graph API? Is there any specific API endpoint that provides this data, or is there another way to achieve this?
Thank you!