使用Grah API获取用户所属的所有租户 [英] Getting all the tenants a user belongs to using grah api

查看:76
本文介绍了使用Grah API获取用户所属的所有租户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用AUTH v2身份验证提供程序和公共租户(login.microsoftonline.com/common/v2.0/)进行身份验证的应用程序.

I have an app which uses the AUTH v2 auth provider and the common tenant (login.microsoftonline.com/common/v2.0/) for authentication.

现在,由于我的用户可以属于任何AAD租户,并且我希望我的用户能够选择他们在其中执行操作的租户,因此我开始寻找一种方法来使所有AAD租户都已登录用户是其中的一部分.

Now, since my users can belong to any AAD tenant, and I want my users to be able to select the tenant in which they are performing operations, I started looking for a way to get all the AAD tenants the logged-in user is part of.

我浏览了图API(graph.microsoft.com)文档,发现的最接近的是:

I went through the graph API (graph.microsoft.com) documentation and the closest I could find was this: https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_getmemberobjects) but it looks like this operation requires the 'Directory.Read.All' scope which according to graph.microsoft.io/en-us/docs/authorization/permission_scopes requires 'admin consent'.

是否有一种方法可以让所有已登录用户可以使用图api来访问租户,而无需征得管理员的同意?

Is there a way to get all the tenants a logged in user has access to using the graph api, and without requiring admin consent?

推荐答案

该API不可用.您能否指出需要此API的方案?另外,请在 uservoice 上提出对此功能/API的请求.

This API is not available. Can you indicate the scenario that requires this API, please? Also please file a request for this feature/API on uservoice.

这篇关于使用Grah API获取用户所属的所有租户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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