Admin roles API call


#1

Hi,

I saw that the official API, https://developer.okta.com/docs/api/resources/roles, only have API calls for roles for SPECIFIC user.
My application is doing an API call for the users list (using the normal /api/v1/users), but unfortunately the user’s role is not returned in this API call. I wished to save calls and not have to do extra API calls for getting the roles of each specific user

I noticed that there is an internal call: ‘/api/internal/administrators’ which does give the roles for ALL users
Is there any official API call like that?

Many thanks,
Amir


#2

No, there isn’t currently an API that will return a list of users given a role.

You’re welcome to use the internal/undocumented API, but be aware that since it is undocumented it could change without warning.