I am trying to get the users assigned to a licence trough the microsoft graph API. Much like on azure
Now thanks to the chrome devtools i found that the following api is called to get this information https://main.iam.ad.ext.azure.com/api/AccountSkus/UserAssignments
Unfortunately trying to access this api is convulted and definitely not suitable for production
I was wondering if there is a way something similar can be done trough the graph api.
https://graph.microsoft.com/beta/users?$select=id,displayName,assignedLicenses,assignedPlans
You can use the below query by giving LastSignInDateTime and SKU to get the users for a particular assigned licenses SKU
https://graph.microsoft.com/beta/users?$filter=signInActivity/lastSignInDateTime le 2020-08-01T00:00:00Z&assignedLicenses/any(x:x/skuId eq xxx7a907fd6c235)&$select=displayname