Microsoft Security | Microsoft Graph
An API that connects multiple Microsoft services, enabling data access and automation across platforms
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.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"
}
]
}