I need to return a list of users from the Microsoft Graph. I am doing this via the /v1.0/users endpoint.
e.g.
https://graph.microsoft.com/v1.0/users/
However, it currently returns accounts for Meeting Rooms set up as resources in Exchange.
I can't see a simple way to detect these and thus filter them from my list easily.
Does anyone know what I could filter by, or look for in the object that would point to it being a resource vs. a user account?
I've been running into this issue as well for awhile now. However, I just stumbled upon this update that looks like the new People API endpoint in the Graph API can support distinguishing between users and rooms/resources: https://dev.office.com/blogs/people-api-available-in-microsoft-graph-v1
I just ran a quick test in the sandbox that confirms that this query:
GET https://graph.microsoft.com/v1.0/me/people?$filter=personType/subclass eq 'Room'
returns a list of my tenant's room resources. It also, nicely, seems that the User.ReadBasic.All
permission is sufficient for the /me/people
endpoint.
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