Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft Graph - Invalid filter clause - conversationId

I am trying to filter by conversationId to get messages and replies for mail, but I am getting an error each time:

 {
    "error": {
        "code": "BadRequest",
        "message": "Invalid filter clause",
        "innerError": {
            "date": "2020-08-24T23:12:43",
            "request-id": "9d1c128a-d97c-4fc4-97b4-5264e566bef8"
        }
    }
}

The request path outputs like this:

https://graph.microsoft.com/v1.0/me/messages?$filter=conversationId eq 'AAQkADJkZTNiN2ZlLTg2M2QtNGZjMC1hNDUxLTdlNjgzZDVjZDljMAAQAKVNpsZfVhlEtPFltSQuNJ8='

When trying the exact same path in Graph Explorer there is no issue at all.

like image 595
Kevin Molina Avatar asked Sep 02 '26 10:09

Kevin Molina


1 Answers

Its mostly likely the code your using is munging the URL when its sending it because of the BASE64 string isn't URI safe. Eg your request doesn't work for me in the Graph Explorer (i get the exact error you state) unless the value is escaped like

https://graph.microsoft.com/v1.0/me/messages?$filter=conversationId eq 'AAQkADJkZTNiN2ZlLTg2M2QtNGZjMC1hNDUxLTdlNjgzZDVjZDljMAAQAKVNpsZfVhlEtPFltSQuNJ8%3D'

So you need to look into what actually is being sent over the wire by your app.

like image 73
Glen Scales Avatar answered Sep 05 '26 18:09

Glen Scales



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!