Unsupported or invalid query filter clause specified for property 'mobilePhone' of resource 'User'

Liang, Jone [GTSCN NON-J&J] 81 Reputation points

when I request to https://graph.microsoft.com/v1.0/users?$filter=mobilePhone eq '13111111111'&$count=true response is 'Unsupported or invalid query filter clause specified for property 'mobilePhone' of resource 'User'',I change request to https://graph.microsoft.com/v1.0/users?$count=true&$filter=mail eq '13111111111' it's working

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,324 questions
0 comments No comments
{count} vote

Accepted answer
  1. JanardhanaVedham-MSFT 3,536 Reputation points

    Hi @Liang, Jone [GTSCN NON-J&J] ,

    As documented here, mobilePhone property does supports filter OData query parameter and it seems to be issue with API and this API filter query is not working as expected. I would advise you to use the below alternative filter API query along with request header (ConsistencyLevel: eventual) as shown below and it is working fine.

    GET https://graph.microsoft.com/v1.0/users?$filter=mobilePhone eq '1234567890'&$count=true  
    ConsistencyLevel: eventual   


    GET https://graph.microsoft.com/v1.0/users?$filter=startsWith(mobilePhone, '1234')&$count=true  
    ConsistencyLevel: eventual   


    For escalating this API issue regarding normail filter query with mobilePhone property to Microsoft Engineering team for thier analysis & resoultion , I would request you to open up a support case either from your Azure portal or M365 admin portal and please mention "Graph API" term in your issue description for quick assignment with our MS graph customer support team. Thanks for your understanding.

    Hope this helps.

    If the answer is helpful to you, please click "Accept Answer" and kindly upvote it. If you have additional questions about this answer, please click "Comment".

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. CarlZhao-MSFT 39,736 Reputation points

    Hi @Liang, Jone [GTSCN NON-J&J]

    This is because you are missing the ConsistencyLevel: eventual header. Also, I think if you call https://graph.microsoft.com/v1.0/users?$count=true&$filter=mail eq '13111111111' api without ConsistencyLevel: eventual header , it should not work, please check.

    Refer to: Advanced query capabilities on Azure AD directory objects.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.