How to use multiple filter operations in beta Graph API?

Anonymous
2022-12-22T19:25:01.92+00:00

I am trying to run the following API:

https://graph.microsoft.com/beta/users?$count=true&$filter=signInActivity/lastSignInDateTime le 2022-09-01T00:00:00Z and endsWith(mail,'@alumni.xxx.xxx')  

and I get the following response:

{  
    "error": {  
        "code": "BadRequest",  
        "message": "Filter not supported.",  
        "innerError": {  
            "date": "2022-12-22T19:21:39",  
            "request-id": "d994b51c-xxxx-xxxx-b0d5-97a8923ab5t9",  
            "client-request-id": "d302b51c-xxxx-yyyy-zzzz-12a8035ce9r9"  
        }  
    }  
}  

Any idea as to what I'm doing wrong?

Thx

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

Accepted answer
  1. Bhanu Kiran 3,616 Reputation points
    2022-12-22T20:27:47.727+00:00

    Hello @Anonymous ,

    Using the below endpoint, I am able to successfully run the query with below filters

    https://graph.microsoft.com/beta/users?$count=true&$filter=signInActivity/lastSignInDateTime le 2022-09-01T00:00:00Z&$filter=endsWith(mail,'@alumni.xxx.xxx')  
    

    273418-filterquery.png

    Hope this helps.
    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    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.