【问题标题】:AADSTS50034: The user account Microsoft.AzureAD.Telemetry.Diagnostics.PII does not exist in the xxx.onmicrosoft.com directoryAADSTS50034:xxx.onmicrosoft.com 目录中不存在用户帐户 Microsoft.AzureAD.Telemetry.Diagnostics.PII
【发布时间】:2019-02-26 11:26:33
【问题描述】:

我正在尝试使用 graph.microsft.com api 来吸引用户加入 AD 帐户。 我可以邀请,但是当尝试使用获取令牌时 https://login.microsoftonline.com/xxxx.onmicrosoft.com/oauth2/token 我收到上述错误。 我正在使用此键以及标题中的其他必需键。 [{"key":"resource","value":"https://graph.microsoft.com","description":""}]

你能告诉我是什么问题吗? 完整的日志。

{ “错误”:“invalid_grant”, "error_description": "AADSTS50034: xxxxx.onmicrosoft.com 目录中不存在用户帐户 Microsoft.AzureAD.Telemetry.Diagnostics.PII。要登录此应用程序,必须将帐户添加到目录中。\r\nTrace ID: 5537uiy4b-4473-4cfb-b45c-1281f61e2100\r\n相关 ID: 8121era7-8df4-47d5-8cc5-3d2f8371029b0\r\n时间戳: 2019-02-26 11:04:46Z", “错误代码”:[ 50034 ], "时间戳": "2019-02-26 11:04:46Z", "trace_id": "5537db4b-4473-4cfb-b45c-1281f61e2100", “correlation_id”:“812138a7-8df4-47d5-8cc5-3d2f8a1029b0” }

【问题讨论】:

  • 根据错误,您似乎没有正确传递 client_id 或和 client_secret。您能否提供除 clientid 和 secret 之外的所有参数?
  • 嗨,我正在使用 client_id、client_secret、username、password、scope、resource 和 grant_type
  • 我也明白了。我怀疑文本“Microsoft.AzureAD.Telemetry.Diagnostics.PII”被错误地插入到错误消息中,因为我希望得到一个实际的用户名,而我提供了一个。这似乎是用户凭据规范的问题。当我删除用户名和密码并选择 client_credentials 作为 grant_type 时,我得到一个密钥就好了。也就是说,我没有解决办法。我只是想同意。
  • 感谢 brit503。任何人都可以在这里提供帮助?
  • 实际上,我可以使用使用 xxx@xxx.onmicrosoft.com 之类的用户 ID 创建的用户获取令牌,但是当我们尝试使用用于发送邀请的个人电子邮件的用户 ID 时:xxx@gmail .com 不工作。我已作为会员和访客进行了检查

标签: azure-ad-graph-api


【解决方案1】:

在我这边,我曾经遇到过这个错误。对于这个错误,您需要检查您使用的用户帐户,用户类型必须是您的 Azure AD 租户中的member,不能是guest

【讨论】:

  • 嗨,我为客人和会员都试过了,但结果是一样的。
  • 用户和你的xxxx.onmicrosoft.com在同一个租户?
  • 是在同一个租户中
猜你喜欢
  • 2015-12-18
  • 2018-01-11
  • 2014-03-14
  • 2015-06-23
  • 2012-04-01
  • 2016-10-31
  • 2022-01-06
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多