Get role ID from rest API Skip to main content
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Lin ZhangLin Zhang 

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?

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 StinigutaPaul Stiniguta (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.
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
Dylann FezeuDylann Fezeu (Customer First Programs)
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