azureazure-active-directoryazure-ad-b2cazure-ad-graph-apigraph-explorer

How to query another Azure Active Directory tenant from Graph Explorer


I am using Azure Graph API Explorer. I want to query the apps list in a tenant. I am user in tenant_x (where user was originally created) as well as admin in tenant_y (created later with my user). I understand that when I log in I go directly in the origin tenant (so tenant_x) therefore Graph Explorer does not allow me to query tenant_y. So as admin of tenant_y I have added a new user in tenant_y. I log in now with that user but still I am not able to query the applications that are in tenant_y. So how can I query apps in tenant_y? Is there a way? thanks.

The API I am calling (with new user log-in) to first retrieve all applications:

https://graph.microsoft.com/beta/applications

Response is:

{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#applications",
"value": []
}

Of course I have apps in that tenant.


Solution

  • Based on our communication, you have used a personal account as guest of tenant_y to query the apps list in tenant_y.

    Unfortunately, Microsoft Graph Explorer will not recognize your personal account as a guest user. It will still treat it as a personal account.

    So it will query the apps list for the personal account rather than tenant_y.

    So now you have two choices:


    Update:

    You can modify the permissions in Microsoft Graph Explorer like this:

    Click on the "modify permissions" under your username in Microsoft Graph Explorer and check the Directory.Read.All permission.

    enter image description here