We posted a feature request https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/graph-api-tenant-list-for-user/idi-p/2465710
That doesn't mean this question is solved, but I hope its getting the attention it deserves.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm looking for a way to access a list of tenants the current user, so the home tenant and tenants where he/she is invited as guest.
I know the existence of List Tenants in the Azure management api, but that API only has ONE scope, namely 'user_impersonation'. This is a bad thing for several reasons:
This is also described here https://stackoverflow.com/questions/60461875/azure-resource-management-api-without-user-impersonation-is-it-possible
https://learn.microsoft.com/en-us/rest/api/resources/tenants/list
It would be great if this would come on the radar of the Graph development team, it would be great if there was a way in the Graph API to just list the tenants a user is a member of with either a Tenants.Read
scope (new), or to be able to access this information with the 'User.Read' or 'profile' scope.
Our use case also doesn't need all the details as provided by the Azure Resource Api, the Id, Name and Home/Guest fields would suffice.
Something like:
[
{
"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"
}
]
I also asked this question on twitter, where the Azure Support team refered me to this page
We posted a feature request https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/graph-api-tenant-list-for-user/idi-p/2465710
That doesn't mean this question is solved, but I hope its getting the attention it deserves.
Please file the feature request so that it can be considered to be implemented.