使用GraphApi在Azure AD中对外部用户进行身份验证

时间:2019-07-02 19:24:31

标签: api .net-core azure-active-directory azure-ad-graph-api

是否可以通过GraphApi使用Azure AD对外部用户进行身份验证? 到目前为止,我已经能够使用GraphApi验证活动目录的用户,但不能验证外部用户的身份。我已经能够识别出受邀请的用户,但无法对其进行身份验证。

活动目录用户的身份验证在Azure AD中完成。身份验证未使用AD内置

1 个答案:

答案 0 :(得分:0)

通常,您可以使用OAuth 2.0 authorization code flowOAuth 2.0 resource owner password credential获取访问令牌。

它适用于您的租户用户和外部租户的受邀用户(工作帐户)。

OAuth 2.0资源所有者密码凭据示例

enter image description here

我成功在租户(hanxia.onmicrosoft.com)中为受邀用户(jack@techlearn.top)获得了令牌,如下所示: enter image description here

我可以使用访问令牌来调用图api以显示我的租户(hanxia.onmicrosoft.com)中的所有用户:

enter image description here

相关问题