Reputation: 41
I am trying to search user using Microsoft Graph API and it works for few attribute like filter=givenName https://graph.microsoft.com/v1.0/users?$filter=givenName eq 'testuser'&$select=surname
I want to search user with mobile number, tried https://graph.microsoft.com/v1.0/users?$filter=mobile eq '+******'&$select=surname
It gives me an error:
"code": "Request_UnsupportedQuery", "message": "Property 'mobile' does not exist as a declared property or extension property."
Upvotes: 0
Views: 3159
Reputation: 1602
Currently, you can use the below query for AAD to filter the users by using ConsistencyLevel:eventual
https://graph.microsoft.com/beta/users?$select=id,displayName,mobilePhone&$filter=startswith(mobilePhone,'***')&$count=true
ConsistencyLevel:eventual
For Azure ADb2c users filter query with counts and Consistency=eventual is actually not supported for B2C tenants. For more information please refer to this
Upvotes: 0