issue with listing users with Graph People

Ege Tunca | S6 1 Reputation point
2022-06-07T14:42:28.79+00:00

Hello all
We are using MS Graph to tag users in our app. For the last 2 weeks we have been having some problems. Some users don't show up on the tagging list. Anyone having similar issue?

Here is the call we use
https://graph.microsoft.com/v1.0/users/?$filter=(startsWith(userPrincipalName,'bob') or startsWith(displayName,'bob') or startsWith(mail,'bob') or startsWith(surname,'bob')) and userType eq 'Member' and accountEnabled eq true&$top=5&$select=id,displayName,givenName,surname,jobTitle,mail,mobilePhone,officeLocation,preferredLanguage,userPrincipalName,department,createdDateTime,activatedAt

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,715 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ege Tunca | S6 1 Reputation point
    2022-06-16T06:57:41.853+00:00

    We solved the issue:

    It was the UserType that was incorrect, the user had an empty/null UserType. This is very unusual and invalid data, it happened because it was an old account (2012), and this property was created in 2014. We requested the client to update this property and it fixed their issue.