Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,546 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I have a question that in Graph exist comment which returns the same output as this syntax in msol:
(Get-MsolUser -UserPrincipalName 'test@test.com').licenses.GroupsAssigningLicense.Guid
Best regards
Use the licenseAssignmentStates
property. Here's an example:
GET https://graph.microsoft.com/beta/users/{userId}?$select=licenseAssignmentStates
And the output:
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users(licenseAssignmentStates)/$entity",
"licenseAssignmentStates": [
{
"skuId": "6fd2c87f-b296-42f0-b197-1e91e994b900",
"disabledPlans": [],
"assignedByGroup": null,
"state": "Active",
"error": "None",
"lastUpdatedDateTime": "2020-03-04T08:12:13.9961249Z"
},
{
"skuId": "87bbbc60-4754-4998-8c88-227dca264858",
"disabledPlans": [],
"assignedByGroup": "84b18857-3c01-48be-b707-492019c57142",
"state": "Active",
"error": "None",
"lastUpdatedDateTime": "2021-03-30T09:31:44.7987025Z"
}
]
}