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

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

问题描述

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

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.

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'.

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?

解决方案

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天全站免登陆