We need a list of tenants the current user is in. His home tenant and all his tenants where he is invited as a guest.
We know of the existence of the List tenants endpoint in the Azure management API, but that requires the `user_impersonation` scope on that endpoint. And that is WAY too much access just to list tenants.
We were told to create a feature request in this question
It would be nice if a (slimmed down version) endpoint could be created in the graph api, preferably with the `User.Read` or `profile` scope, that will just list all the tenants the user is a member of or a guest.
The use case is that we are building a multi tenant application and we want users to access the application in the context of the tenant they choose. So if the user is in multiple tenants he/she is able to switch between them.
So for use something like this would be enough
[
{
"id": "896a4689-1e14-4572-9375-028c2449d145",
"name": "Tenant A",
"userTenant": "Home"
},
{
"id": "f4af3776-fb13-470f-86ae-1c185a4c2e63",
"name": "Tenant b",
"userTenant": "Guest"
},
{
"id": "ae287e2c-979e-4590-a51a-729f42adbbe2",
"name": "Tenant C",
"userTenant": "Guest"
}
]
Something similar as Teams does, where you just have a drop-down with all the tenants you can use the application for.