0

I am using google oauth in my application, and I need to find out if that user is the admin of that domain. How do I do that?

Kaustubh
  • 64
  • 1
  • 7
  • Ninja (cool name btw), such topics are considered [off-topic](http://stackoverflow.com/help/on-topic) for SO. Perhaps Quora may be a better place if you are looking for advice on how to proceed. – dubes Jun 02 '16 at 07:48
  • @dubes this question is legit as long as OP is asking how to programmability determine admins. – Jay Lee Aug 03 '16 at 14:52

1 Answers1

2

You can use the Admin SDK Directory API's users.list() call while specifying a query parameter of isAdmin=true to pull a list of all super admin users in the Google Apps domain.

Update: with the new roleAssignments.list() call you can determine admin rights for super and delegated admins which offers a greater level of detail about which users have which admin privileges.

Jay Lee
  • 13,415
  • 3
  • 28
  • 59