I have two kind of office365 license.
Office 365 Business
Office 365 Business Premium
And I want get license list detail, which result is below
Office 365 Business - WHITEBOARD_PLAN1
Office 365 Business - Microsoft Forms (Plan E1)
Office 365 Business - Exchange Foundation
Office 365 Business - Sway
Office 365 Business - Office Online
Office 365 Business - Old - OneDrive for Business (Plan 1)
Office 365 Business - O365 Business
Office 365 Business Premium - MICROSOFT_SEARCH
Office 365 Business Premium - WHITEBOARD_PLAN1
Office 365 Business Premium - MYANALYTICS_P2
Office 365 Business Premium - DYN365BC_MS_INVOICING
Office 365 Business Premium - KAIZALA_O365_P2
Office 365 Business Premium - STREAM_O365_SMB
Office 365 Business Premium - Deskless
Office 365 Business Premium - To-Do (Plan 1)
Office 365 Business Premium - Microsoft Bookings
Office 365 Business Premium - Microsoft Forms (Plan E1)
Office 365 Business Premium - Flow for Office 365
Office 365 Business Premium - PowerApps for Office 365
Office 365 Business Premium - O365_SB_Relationship_Management
Office 365 Business Premium - Microsoft Teams
Office 365 Business Premium - Microsoft Planner
Office 365 Business Premium - Sway
Office 365 Business Premium - Office Online
And I can not find the api after several hour search.
So somebody can help? Thank you
I hope you have an azure tenant. If you are asking about the API to list the commercial subscriptions that your organization has acquired, then you can use Microsoft Graph API. It's subscribedSkus API can list your subscriptions:
https://learn.microsoft.com/en-us/graph/api/subscribedsku-list?view=graph-rest-1.0&tabs=cs
The Microsoft Graph API offers a single endpoint, https://graph.microsoft.com
, to provide access to the Microsoft 365 services. You can use REST APIs or SDKs to access the endpoint.
Here the Request URL https://graph.microsoft.com/v1.0/subscribedSkus
gives a json response somewhat like:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscribedSkus",
"value": [
{
"capabilityStatus": "Enabled",
"consumedUnits": 1,
"id": "gf7-b578-5b71df",
"skuId": "c7-392b571df",
"skuPartNumber": "ENTERPRISEPREMIUM",
"appliesTo": "User",
"prepaidUnits": {
"enabled": 1,
"suspended": 0,
"warning": 0
},
"servicePlans": [
{
"servicePlanId": "c4806f287",
"servicePlanName": "INFORMATION_BARRIERS",
"provisioningStatus": "PendingProvisioning",
"appliesTo": "User"
},
{
"servicePlanId": "e95bec9d0c014",
"servicePlanName": "SHAREPOINTWAC",
"provisioningStatus": "Success",
"appliesTo": "User"
}
]
}
]
}
Compare the results with the information available in https://admin.microsoft.com/AdminPortal/Home#/licenses.
You can see that for each license type,
"consumedUnits": 1
refers to number of Assigned licenses
"prepaidUnits": { "enabled": 1 }
refers to number of Valid licenses