How can I use ge/le to filter businessPhones

Aron Hegedus 26 Reputation points

On the page about Advanced query capabilities on Azure AD directory objects here:
it says that you can use "eq/startsWith/ge/le" on businessPhones. When I query the /users endpoint, the businessPhones is a list. How can I use the le and ge on this? I know that if I want to do the startsWith, the I need to give the header ConsistencyLevel: eventual , and ask for something like$filter=businessPhones/any(p:startsWith(p, '4'))&$count=true


But I can't figure out how the le or ge would even work, as the phone numbers are integers, they're strings. And I don't think you can filter on the LENGTH of the businessPhones.


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

Accepted answer
  1. Zehui Yao_MSFT 5,796 Reputation points

    Hello @Aron Hegedus , I tested locally, and here is the manually method of using le and ge operators:

    GET$filter=businessPhones/any(p:p le '3')&$count=true  


    GET$filter=businessPhones/any(p:p ge '3')&$count=true  


    and here is the documentation for evaluating matches on multi-valued properties:

    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.

0 additional answers

Sort by: Most helpful