Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out who the Global Administrator is for a directory to which I belong

I have checked in every possible area in the classic Azure portal but I can't seem to find the "Global Administrator" for the directory to which I belong.

Is there a way to find this out in the portal?

like image 301
PussInBoots Avatar asked Jan 05 '23 15:01

PussInBoots


1 Answers

You should be able to look up the company administrators in your tenant by making two queries to the AAD or Microsoft Graph API.

The first query will allow you to identify the objectId of the "Company Administrator" role in your tenant.

https://graph.windows.net/<tenant>/directoryRoles

Then you need to find the directoryRole where "roleTemplateId": "62e90394-69f5-4237-9190-012177145e10", and save the objectId.

Next you can query the members of that directoryRole using the following:

https://graph.windows.net/<tenant>/directoryRoles/<objectId>/members

Try it all out using the Graph Explorer, and it's demo Tenant:

Query 1

Query 2

Let me know if this helps!

like image 83
Shawn Tabrizi Avatar answered Jan 19 '23 01:01

Shawn Tabrizi