【发布时间】:2020-04-19 15:52:28
【问题描述】:
我正在尝试调用 microsoft graph api,我已按照 microsoft documnets 的说明进行如下操作:
1- azure 门户中的应用注册 支持的账户类型:所有微软账户用户 2- 通过这些参数调用'https://login.microsoftonline.com/',tenant_id,'/oauth2/v2.0/authorize':
client_id <- #Application Id - on the azure app overview page
client_secret <-# the secret key for my app from azure portal
scope <- 'https://graph.microsoft.com/.default'
grant_type <- 'password'
username <- 'XXX@outlook.com'
password <- # the user password
tenant_id <-# tenant id for my app from azure portal
但它有这个错误:
AADSTS50034: The user account {EmailHidden} does not exist in the <tenant_ID> directory. To sign into this application, the account must be added to the directory.
我使用通过 api 传递的同一个帐户注册了我的应用程序。
我想从图表中调用我的待办事项列表。
根据@MdFaridUddinKiron 的回复,我添加了更多解释:
我认为我的 azure 域中的某些内容是错误的,这些是它的一些屏幕截图: 1-它显示端点的“通用”,我应该使用什么? “普通”或我的租户: 2- 我的应用程序身份验证选项卡有一些差异,这很重要吗? 3- 我的域概览页面如下所示: 4- 用户被添加到我的活动目录 5- 用户应用页面: 6-用户分配的角色:
我在graph explorer 中由同一用户成功测试了microsoft graph api,我对身份验证流程必须如何感到困惑。 我只想调用我自己的 todo 任务
【问题讨论】:
-
个人
XXX@outlook.com不支持grant_type:password用户名必须是租户特定的。 -
如何设置参数?你能解释更多吗?
-
我已经向您展示了详细信息,请试一试,让我知道您的更新。
-
您好,请问有什么可以帮忙的吗?
-
亲爱的@MdFaridUddinKiron 我添加了有关我的问题的更多信息。你能帮我更多吗?
标签: azure-active-directory microsoft-graph-api