Compose Microsoft Graph queries against Intune deviceManagement resources and get
three outputs — URL / PowerShell (Graph SDK) / curl. Resource paths and required application permissions follow the official documentation.
Advertisement
How authentication works
App registration (client credentials) is the norm: register in Entra ID → grant application permissions → admin consent → create a secret
Interactive work can use Connect-MgGraph -Scopes "..." (delegated), but the permissions themselves are defined on the app side
Try it in the Graph portal: /beta/deviceManagement/… at https://developer.microsoft.com/graph/geek-out
Pitfalls
Different syntax from Intune assignment filters — Graph OData uses eq / startswith; Intune filters use -eq / -startsWith. Mixing them returns HTTP 400
Properties missing from v1.0 may exist in beta — beta can change; prefer v1.0 in production scripts
Using $count requires ConsistencyLevel: eventual — without the header you get a 400 (the curl output already sends it)
Server-side paging — a response is capped; follow @odata.nextLink to get the rest
Skipping $select makes responses heavy — on large tenants it is slow, so project only the columns you need