Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,447 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Looking to export all the guest users along with the "Sponsors" field using - https://graph.microsoft.com/v1.0/users?$filter=userType+eq+'guest'&$select=id,displayName,mail,city,Sponsors
However, "Sponsors" doesn't show up.
That's because sponsors
is a reference/navigation property, so you either need to use individual queries against /users/{id}/sponsors
or leverage the $expand
operator:
GET https://graph.microsoft.com/v1.0/users?$filter=userType+eq+'guest'&$select=id,displayName,mail,city&$expand=sponsors($select=id,userPrincipalName)