I'm trying this request:
https://graph.microsoft.com/v1.0/users?
$filter=assignedLicenses/any(d:d/skuid eq 28d45cd1-ad8b-15cd-a9e1-52e6a5c24328)
But I get this error:
BadRequest - ')' or ',' expected at position 71 in 'assignedLicenses/any(d: d/skuid eq 28d45cd1-ad8b-15cd-a9e1-52e6a5c24328'.
Am I doing anything wrong? is this query possible?
Just an update that this is now a supported API call. The correct syntax is:
https://graph.microsoft.com/v1.0/users?$filter=assignedLicenses/any(x:x/skuId eq e578b273-6db4-4691-bba0-8d691f4da603)
e578b273-6db4-4691-bba0-8d691f4da603 is Faculty A3 SKU in this example
In general, only those properties where the documentation says "supports $filter" can be filtered.
E.g. on the user
object, accountEnabled
can be filtered.
Since the assignedLicenses
property doesn't say it, and the assignedLicense
resource type doesn't have it documented on the skuId
property, I don't think you can perform that query.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With