Share via

Using Odata conditional operator in query parameter gets error

Gtman Chin 70 Reputation points
2024-01-07T11:24:01.53+00:00

I'm doing test with Graph explorer. When I use following, everything works fine

  1. https://graph.microsoft.com/v1.0/me/drive/root/children?$filter=startsWith(name, 'cdfs')
  2. https://graph.microsoft.com/v1.0/me/drive/root/children?$filter=folder ne null

However, when I add conditional operator to between the two syntaxes, graph returns error:

https://graph.microsoft.com/v1.0/me/drive/root/children?$filter=folder ne null and startsWith(name, 'cdfs')

Does anyone encounter the problem? Or any help?

Thanks.

The returned error codes:

"code": "notSupported",
"message": "Operation not supported",
Microsoft Security | Microsoft Graph
0 comments No comments

Answer accepted by question author

AsithwMSFT 1,520 Reputation points Microsoft External Staff
2024-01-07T22:32:21.95+00:00

@Gtman Chin

Even though your filter query format is correct with 'and' operator, as the error response indicates that Graph API filter does not support this.

However, this doesn’t mean that similar format API queries won’t work in other scenarios.

It’s just that in this particular case, it doesn’t function as expected due to the limitations of the Graph API filter.

You have the option to submit a feature request at this location: Microsoft 365 Developer Platform.

you could request feture from heere https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

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.