Microsoft Graph API filter query limit on or conditions

Aditya Mehetre 30 Reputation points
2024-09-07T20:23:46.6566667+00:00

I'm using microsoft graph sdk in Spring Boot. I have a list of userIds and want to get the users corresponding to these IDs using Graph API. I can use a filter like /users?$filter=id eq id1 or id eq id2 or .... My question is, what is the limit allowed by Graph API in this case (number of or conditions in a request)?

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

Accepted answer
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2024-09-08T15:25:59.1966667+00:00

    There are some limits in the number of operators you can use, as well as the overall URL length. The generic advise is to split the query into multiple requests and use BATCHes. See for example this thread: https://stackoverflow.com/questions/66579149/microsoft-graph-client-retrieve-more-than-15-users

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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