I`m working on app using Microsoft Graph to manage groups in AAD. When trying to filter groups that name contains #, using following query:
groups?$filter=(startswith(displayName,'#'))
Exact filter clause of code in C# that produces this error is following:
Filter($"(startswith(displayName,'{name}') or startswith(mail,'{name}'))")
I get following response from Graph:
{
"error": {
"code": "BadRequest",
"message": "Invalid filter clause",
"innerError": {
"request-id": "4d80e6a8-326a-4f79-9ea4-0e7924954181",
"date": "2018-02-06T09:56:01"
}
}
}
Documentation does not mention that # is invalid character, moreover- groups are created properly with this character in name.
Can someone confirm that this is a bug in Graph?
I noticed that manual encoding #
as %23
seems to fix the issue and filtering works fine.
EDIT - interesting thing - apostrophe '
throws this error even if it`s encoded as %27
.