question

BrianMcCullough-3684 avatar image
0 Votes"
BrianMcCullough-3684 asked saldana-msft edited

What is the suggested "way" or best option(s) for filtering out non-human accounts from /users Graph API endpoint?

What is the suggested "way" or best option(s) for filtering out non-human accounts from /users Graph API endpoint? givenName ne null? surname ne null?

microsoft-graph-usersmicrosoft-graph-identity
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

adding right tags/teams to assist.

0 Votes 0 ·

1 Answer

Pras12-3120 avatar image
0 Votes"
Pras12-3120 answered

If I got your question right, here is something I just did:

  1. https://graph.microsoft.com/v1.0/users?$filter=userType eq 'Member'

With the above call, I can separate out Member vs. Guest because that's the only option MS Graph supports at the moment.

  1. To further filter out more details of an employee or employees, I used companyName and createdDateTime which gave me the results I want.
    Even Company name parameter isn't working because of some syntax error from my side, it will help to reduce unnecessary accounts.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.