gpt4 book ai didi

c# - 在 B2C 租户上使用 Microsoft.Azure.ActiveDirectory.GraphClient 查询 User.SignInNames

转载 作者:行者123 更新时间:2023-12-03 03:08:50 35 4
gpt4 key购买 nike

是否可以根据 SignInNames 过滤用户。我尝试运行

Client.Users.Where(u => u.SignInNames.Any(x => x.Type == "emailAddress" && x.Value == email)).ExecuteSingleAsync() as User;

其中 email 是本地帐户用户,其登录名为 admin@{mytenant}.onmicrosoft.com

但我刚刚明白

Microsoft.Data.OData.ODataErrorException: Encountered an internal server error. ---> System.Data.Services.Client.DataServiceQueryException: An error occurred while processing this request. ---> System.Data.Services.Client.DataServiceClientException: {"odata.error":{"code":"Service_InternalServerError","message":{"lang":"en","value":"Encountered an internal server error."}}}

知道出了什么问题吗?

<小时/>

如果您的查询中有多个操作,客户端似乎不喜欢它,运行 SignInNames.Any(x => x.Value == email) 工作正常。

最佳答案

目前,无法过滤 SignInName 值以外的任何内容

如果您想查看此内容,可以在 Graph API UserVoice forum 中请求。 .

关于c# - 在 B2C 租户上使用 Microsoft.Azure.ActiveDirectory.GraphClient 查询 User.SignInNames,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41596632/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com