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

Brian McCullough 1 Reputation point
2021-02-19T12:43:01.607+00:00

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
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,087 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PrasF12 1 Reputation point
    2021-07-15T08:11:26.707+00:00

    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.
    0 comments No comments