Getting all the tenants a user belongs to using grah api

风流意气都作罢 提交于 2020-01-13 19:42:11

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/38923520/getting-all-the-tenants-a-user-belongs-to-using-grah-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!