Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community

Graph API: Tenant list for user

Graph API: Tenant list for user
14

Upvotes

Upvote

 Jun 20 2021
5 Comments (5 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
Copper Contributor

Any updates on this? :) 

Copper Contributor

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

Brass Contributor

@lindalu-MSFT I'm done migrating user voice stuff if this was a temporary location, why did Microsoft even allow other to post things, and can't the migration be done automically. This is migration 6 and I never actually got any of the features. I'll just try some other channel.

Copper Contributor

I migrated this request to here: Graph API: Tenant list for user · Community (microsoft.com)

 

Please upvote there as well.