[MS Graph]: Handling special characters in string search in a MS graph query

Viewed 1530

I am searching for an object with a display name. MS graph throws an exception if it contains & or # withing the search string. Is there a way around this??

https://graph.microsoft.com/XXXXXXXXXXXXXXXXXXXXXXXXXXXX?$filter=displayName eq 'application # manager'
1 Answers

You need to URL encoding the '#' in the request.

For example below request will help you in querying 'application # manager',

https://graph.microsoft.com/v1.0/users?$filter=displayName eq 'application%20%23%20manager'

For more details look in to Output in my environment below:-

enter image description here

Related