Graph API: Tenant list for user

Graph API: Tenant list for user
10

Upvotes

Upvote

 Jun 20 2021
3 Comments (3 New)
New

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.

Comments
Occasional Visitor

Any updates on this? :) 

Occasional Visitor

Any updates on this? :)  :))

Microsoft

Hi, this was incorrectly tagged so I updated it to Microsoft Graph. Also, this community was intended to be a temporary location to submit product feature suggestions between Microsoft moving off of UserVoice and the release of Microsoft's official Feedback portal app. Now that the latter is released, we encourage you to resubmit this great suggestion on the official Microsoft Graph Feedback portal at https://feedbackportal.microsoft.com/feedback/forum/ebe2edae-97d1-ec11-a7b5-0022481f3c80?page=1&sort....

Kind regards,

Linda

Microsoft 365 Developer Platform community steward