Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I detect a meeting room in list of users returned from the Microsoft Graph?

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?

like image 708
Chris Johnson Avatar asked Aug 20 '16 17:08

Chris Johnson


1 Answers

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.

like image 115
Emily Shenfield Avatar answered Oct 23 '22 04:10

Emily Shenfield