Allan Xu
Allan Xu

Reputation: 9358

How can I change default tenant in Microsoft Graph Explorer

I am working with Graph Explorer to experiment with permissions:

https://developer.microsoft.com/en-us/graph/graph-explorer

When I authenticate to Graph Explorer, it always sends queries to the AD tenant that my identity is created in.

However, the identity I am using can query multiple Azure AD tenants.

How can I change default tenant in Graph Explorer

Upvotes: 27

Views: 19250

Answers (4)

drewid
drewid

Reputation: 2793

This answer needs to be updated. Graph Explorer does "not" currently allow you to change tenant from what I have currently tested, using the methods mentioned.

Graph explorer is only working for the tenant your user is defaulted to.

In the past I am pretty sure as long as I was an admin/owner on the tenant I could switch. This no longer seems to be the cases. Tenant is not switching when I specifically specify "tenant=" and use both the primary domain and the original .onmicrosoft domain.

Upvotes: 1

ΩmegaMan
ΩmegaMan

Reputation: 31686

Create a service account in the tenant you want to access.

  1. Create a Service account with appropriate accesses/groups in the Target Tenant.
    • Users -> New user
    • Roles User Administrator
    • Save
  2. In a clean/Private Window bring up https://aka.ms/ge the Graph Explorer. Note that the test tenant will be engaged.
  3. Select the user button and initiate a login with the credentials setup in step 1.
  4. Initiate the first Get the Get My Profile to verify the service account logged in is found.

Upvotes: -1

Abhishek Agrawal
Abhishek Agrawal

Reputation: 2287

If you want to sign into your own tenant in Graph explorer, use tenant query string parameter.

https://developer.microsoft.com/en-us/graph/graph-explorer?tenant=contoso.onmicrosoft.com

A simple url to go to Graph explorer is https://aka.ms/ge, when you land on the destination, just add tenant query string parameter (domain name or tenantId, both work).

If you are already signed into a tenant, you will have to logout from there. currently automatic switch of tenant is not supported.

Upvotes: 37

Marc LaFleur
Marc LaFleur

Reputation: 33114

This is fundamentally how Microsoft Graph works, it retrieves data from the tenant you (or your app) authenticated against. It cannot query across multiple tenants.

Upvotes: -4

Related Questions