cannot add more than 15 filter conditions

Roshan API Test 0 Reputation points
2024-06-24T13:14:00.89+00:00

i'm trying to list all user emails using the "https://graph.microsoft.com/v1.0mailFolders/inbox/messages" endpoint. my requirement is want to get only emails from selected domains and ignore emails from some selected email addresses. but as of now when i add more than 10 emails in the filter parameter, its showing error. how to do this?

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

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-06-25T02:38:31.95+00:00

    Hi @Roshan API Test

    According to the Graph API, the $filter query parameter clause is limited to 15 expressions by default, and if you need to add more expressions, you can use the advanced query, which adds the parameter ConsistencyLevel: eventual to the request header

    User's image

    See this link for more details:

    https://learn.microsoft.com/en-us/graph/aad-advanced-queries?tabs=http

    Hope this helps.

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


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.