Properties not supporting filters on GET method

Anonymous
2022-02-08T06:14:52.877+00:00

Hello Team,

I have worked on Microsoft Graph API (v 1.0) objects (Users, Administrative Units, Organization, Domains, Groups & Devices). For GET Method API call of Users, Administrative Units & Groups , I have come across errors message as "Request_UnsupportedQuery" on filters along some properties which were said as supported in properties description.

Here are the objects which didn't work along filters:

Administrative units: description
Property & Supported filters: https://learn.microsoft.com/en-us/graph/api/resources/administrativeunit?view=graph-rest-1.0

Users: companyName,employeeHireDate,employeeType,faxNumber,mobilePhone,officeLocation,postalCode ,preferredLanguage ,showInAddressList ,streetAddress
Property & Supported filters: https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0

Groups: description
Property & Supported filters: https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0

Filters Supported List: https://learn.microsoft.com/en-us/graph/aad-advanced-queries#device-properties

Response Screenshot:

172098-image.png

Can you please help me running the properties along filters for above?

Thankyou.

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 123.6K Reputation points MVP Volunteer Moderator
    2022-02-08T08:17:03.57+00:00

    Such filters require the "consistencyLevel"="eventual" header and the user of $count=true operator:

    172172-image.png

    Refer to the documentation articles you linked above for more details.

    0 comments No comments

  2. Zehui Yao_MSFT 5,881 Reputation points
    2022-02-08T08:38:42.627+00:00

    Administrative units: description

    https://graph.microsoft.com/v1.0/directory/administrativeUnits?$select=description

    User: companyName,employeeHireDate,employeeType,faxNumber,mobilePhone,officeLocation,postalCode ,preferredLanguage ,showInAddressList ,streetAddress

    https://graph.microsoft.com/v1.0/users?$select=companyName,employeeHireDate,employeeType,faxNumber,mobilePhone,officeLocation,postalCode ,preferredLanguage ,showInAddressList ,streetAddress

    Groups: description

    https://graph.microsoft.com/v1.0/groups?$select=description

    Response Screenshot:

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


    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.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.