0
votes

When I call _activeDirectoryClient.Groups.AddGroupAsync(group) where group's displayname is larger than 120 char, it throws the following exception:

Microsoft.Data.OData.ODataErrorException: Unsupported or invalid query filter clause specified for property 'displayName' of resource 'Group'. ---> System.Data.Services.Client.DataServiceQueryException: An error occurred while processing this request. ---> System.Data.Services.Client.DataServiceClientException: {"odata.error":{"code":"Request_UnsupportedQuery","message":{"lang":"en","value":"Unsupported or invalid query filter clause specified for property 'displayName' of resource 'Group'."}}} at System.Data.Services.Client.BaseAsyncResult.EndExecute[T](Object source, String method, IAsyncResult asyncResult) at System.Data.Services.Client.QueryResult.EndExecuteQuery[TElement](Object source, String method, IAsyncResult asyncResult)

PS: I asked this in Microsoft Graph github. But, I was told to post it here instead.

1

1 Answers

1
votes

I think that error is not caused by AddGroupAsync function , if group's displayname exceeds its' allowed length , it will throw below error :

Invalid value specified for property 'displayName' of resource 'Group'.

Your error seems invalid query filter on displayname property , after testing , when using query filter on displayname property(greater than 120 chars length) :

https://graph.windows.net/xxxxx.onmicrosoft.com/groups?$filter=displayName eq 'xxxxxxx'&api-version=1.6

It shows same error as yours , that seems server side restricts the length of filter on properties. If you want azure ad graph api supports that , you could send a feedback here .