Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/328.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# AAD图形客户端:创建长度大于120个字符的广告组_C#_Azure Ad Graph Api - Fatal编程技术网

C# AAD图形客户端:创建长度大于120个字符的广告组

C# AAD图形客户端:创建长度大于120个字符的广告组,c#,azure-ad-graph-api,C#,Azure Ad Graph Api,当我调用组的displayname大于120个字符的_activeDirectoryClient.Groups.AddGroupAsync(group)时,它会引发以下异常: Microsoft.Data.OData.ODataErrorException:不支持或无效的查询 为资源的属性“displayName”指定的筛选器子句 “组”。-->System.Data.Services.Client.DataServiceQueryException: 处理此请求时出错。--> System.D

当我调用组的displayname大于120个字符的_activeDirectoryClient.Groups.AddGroupAsync(group)时,它会引发以下异常:

Microsoft.Data.OData.ODataErrorException:不支持或无效的查询 为资源的属性“displayName”指定的筛选器子句 “组”。-->System.Data.Services.Client.DataServiceQueryException: 处理此请求时出错。--> System.Data.Services.Client.DataServiceClient异常: {“odata.error”:{“code”:“Request_UnsupportedQuery”,“message”:{“lang”:“en”,“value”:“Unsupported” 或为的属性“displayName”指定的查询筛选器子句无效 资源“组”。“}}位于 System.Data.Services.Client.BaseAsyncResult.EndExecute[T](对象 源、字符串方法、IAsyncResult异步结果)位于 System.Data.Services.Client.QueryResult.EndExecuteQuery[TElement](对象 源、字符串方法、IAsyncResult异步结果)


附言:我是这样问的。但是,我被告知将其发布在这里。

我认为该错误不是由AddGroupAsync函数引起的,如果组的displayname超过其允许的长度,它将抛出以下错误:

Invalid value specified for property 'displayName' of resource 'Group'.
测试后,在displayname属性上使用查询筛选器(长度大于120个字符)时,您的错误似乎对displayname属性的查询筛选器无效:

它显示了与您相同的错误,即服务器端似乎限制了属性上筛选器的长度。如果您希望azure ad graph api支持这一点,您可以发送反馈

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