<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D50Z00008G7VKdSANOkta Classic EngineIntegrationsAnswered2025-10-04T09:01:17.000Z2018-02-28T17:28:11.000Z2018-08-12T04:16:20.000Z
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.

  • 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

    Expand Post
    Selected as Best
  • 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

    Expand Post
    Selected as Best
  • j5v7c (j5v7c)

    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
    Expand Post
This question is closed.
Loading
How can I retrieve the group admin of all groups using the API?