1
votes

I am trying to get list of mails that are with high importance via Graph API.

For that, I am using below query:

https://graph.microsoft.com/v1.0/me/messages?$select=importance,subject

But that's not working out as it is giving all :(

I found that I have to add filter in the query and tried like below:

https://graph.microsoft.com/v1.0/me/messages?$select=importance,subject &
$filter=importance eq high

But I'm getting error like below:

{
    "error": {
        "code": "RequestBroker--ParseUri",
        "message": "Could not find a property named 'high' on type 'Microsoft.OutlookServices.Message'.",
        "innerError": {
            "date": "2022-06-10T04:29:52",
            "request-id": "",
            "client-request-id": ""
        }
    }
}

I think I'm using query in a wrong way. Can anyone suggest me what's wrong?

1

1 Answers

0
votes

Use single quotation mark '' for the specific name of the importance

https://graph.microsoft.com/v1.0/me/messages?$select=importance,subject&$filter=importance eq 'high'