在Azure AD中为来宾用户提供图谱API请求 [英] Graph API requests for guest users in Azure AD

查看:80
本文介绍了在Azure AD中为来宾用户提供图谱API请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我们如何在Azure AD中为来宾用户进行图形API调用.我可以使用

I wanted to know how can we make graph API calls for guest users in Azure AD. I am able to achieve it for internal users using the API examples given here but the same calls are not working on guest user. Is there any difference in the way the requests need to be made?

推荐答案

您的租户中的来宾帐户将具有与其家庭租户中的UPN不同的用户主体名称.通过查询租户中的所有用户,并找到具有修改的"用户主体名称(通常使用"EXT")的外部用户,您应该能够看到这一点的证据.

Guest accounts in your tenant will have a different user principal name than the UPN they have in their home tenant. You should be able to see evidence of this by querying all the users in your tenant, and finding the external users which have a 'modified' user principal name, usually with "EXT".

您可以在我们的演示租户

You can see a direct example of this in our Demo Tenant here

"userPrincipalName": "djayachandran.cw_mmm.com#EXT#@GraphDir1.onmicrosoft.com",

您似乎需要使用其他属性来查询这些用户,而这些属性的旧UPN不会更改,例如'mail'属性.最终,您想要找到感兴趣的用户的ObjectId,并将其用作查找用户信息的键.您应该能够从已登录用户的令牌中获取对象ID.

It seems like you will need to query for these users using other properties where their old UPN is not changed, like the 'mail' property. Ultimately, you want to find the ObjectId of the user you are interested in, and use that as your key to find the user information. You should be able to get the object id from the token of the signed in user.

让我知道这是否有帮助! 谢谢, 肖恩·塔布里兹(Shawn Tabrizi)

Let me know if this helps! Thanks, Shawn Tabrizi

这篇关于在Azure AD中为来宾用户提供图谱API请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆