<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
0D50Z00008G7VbnSAFOkta Classic EngineIntegrationsAnswered2024-04-30T09:18:25.000Z2018-04-23T17:09:38.000Z2018-07-31T15:36:40.000Z
Get role ID from rest API
I am working on an integration project with okta via okta rest APIs. One use case needs to get ID for role type “APP_ADMIN”. I don’t find official API for this. (I think a simple API listing all roles should do it.)  Is there solution for this?

 

PS:

I see people talking about unofficial] or undocumented APIs. Also, will that ID will be consistent so that I can put it as configuration.

 

Thanks for advice!

  • Paul S. (Okta, Inc.)

    Hello Lin,

     

    At this time there is no API call that will provide the role ID. In order to get it you can use the API call /api/v1/users/${userId}/roles and using an App Admin user ID  to get the role ID for App Admin.

    For Admin Roles API you can use this documentation.

    https://developer.okta.com/docs/api/resources/roles?_ga=2.91157401.2076886823.1524581778-892821130.1524581577#administrator-roles-api

    If you have any other question or require further assistance on this issue, don't hesitate to open a ticket with Support.

     

    Kind Regards,

     

    Paul Stiniguta

    Technical Support Engineer

    Okta Global Customer Care

    Expand Post
  • j5v7c (j5v7c)

    Hello Lin,

     

    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

    Okta Help Center Team
    Expand Post
This question is closed.
Loading
Get role ID from rest API