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

标签 c# asp.net azure azure-ad-b2c azure-ad-graph-api

是否可以根据 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/

相关文章:

c# - 图表控件。如何删除图例标签

azure - Windows Server 2012 Azure VM通过https间歇性访问

python - Azure 语音转文本 - 连续识别

azure - 使用 ADF REST 连接器读取和转换 FHIR 数据

c# - join和groupby后如何排序

c# - 远程MySQL连接: 'Host does not support SSL connections'

c# - 将报告重新绑定(bind)到新的 XML XSD

c# - 我如何使用 asp.net 从另一个用户控件调用用户控件的方法?

java - 无法从 Java Web 服务获取数据

c# - 从 DataRow 获取值(value)的最佳方式是什么?