How can I retrieve the group admin of all groups using the API? Skip to main content
https://support.okta.com/help/answers?id=9062a000000dfo3qag&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
1_Simon Garratt1_Simon Garratt 

How can I retrieve the group admin of all groups using the API?

I need to export a list of all of my group administrators.  I'm new to Okta and I'm struggling with some of the concepts.  I've found the Okta PowerShell module at mbegan/Okta-PSModule (https://github.com/mbegan/Okta-PSModule) and I've managed to get users and groups but I can't work out how to do this particular query.  Can anyone help, please?  I'm happy to use another mechanism if this module isn't the right/best/easiest way - I just need to get the list.
Best Answer chosen by Dylann Fezeu (Customer First Programs)
BehrouzBehrouz (Okta, Inc.) 
Thanks for contacting Okta.

The easiest way is to simply go to Security > Administrators using Okta's UI and see Admins and roles/groups assigned to your admins.
 
You also can use the following calls to get them in the API response.

Getting a list of group targets for group admins:
GET {{url}}/api/v1/users/{{userId}}/roles/{{roleId}}/targets/groups
 
List of roles assigned to an admin:
GET {{url}}/api/v1/users/{{userId}}/roles
 
If you need more info or have inquiries regarding Admin API's; I would recommend visiting our developers page on https://developer.okta.com/ or creating a support ticket.
 
Wish you a great day ahead,
 
Thanks,
 
Behrouz Ghorchi
Technical Support Engineer
Okta Global Customer Care

 

All Answers

BehrouzBehrouz (Okta, Inc.) 
Thanks for contacting Okta.

The easiest way is to simply go to Security > Administrators using Okta's UI and see Admins and roles/groups assigned to your admins.
 
You also can use the following calls to get them in the API response.

Getting a list of group targets for group admins:
GET {{url}}/api/v1/users/{{userId}}/roles/{{roleId}}/targets/groups
 
List of roles assigned to an admin:
GET {{url}}/api/v1/users/{{userId}}/roles
 
If you need more info or have inquiries regarding Admin API's; I would recommend visiting our developers page on https://developer.okta.com/ or creating a support ticket.
 
Wish you a great day ahead,
 
Thanks,
 
Behrouz Ghorchi
Technical Support Engineer
Okta Global Customer Care

 
This was selected as the best answer
Dylann FezeuDylann Fezeu (Customer First Programs)
Hello,

Thanks for posting your inquiry in Okta Community Portal.

​If you receive a great answer to your question(s), please help readers find it by marking it the best answer. Hover over the answer and click "Best Answer." 

Thank you,

​Dylann Fezeu
OHC Team