Use this API to get back a single user’s privileges from a OneLogin account.
Resource URL
https://<subdomain>.onelogin.com/api/2/users/:id/privilegesHeader Parameters
Authorization required string | Set to Set The access token must have been generated using an API credential pair created using the scope required to call this API. This API can be called using any one of the following scopes: |
Resource Parameters
id required integer | Set to the If you don't know the user's |
Sample Responses
- 200 OK
- 401 Unauthorized
- 404 Not Found
[
{
"id": 426205,
"name": "Super user"
},
{
"id": 426206,
"name": "Manage accounts"
},
{
"id": 426636,
"name": "Manage subscriptions"
},
{
"id": 431990,
"name": "Assume users"
}
]Typically, this error means that your access token value is invalid.
{
"message": "Unauthorized",
"name": "UnauthorizedError",
"statusCode": 401
}{
"message": "The resource with the given id could not be found",
"name": "NotFoundError",
"statusCode": 404
}Postman Collection
Replace sample variables indicated by {{ }} with your actual values.
Sample Code
cURL
Replace sample values indicated by < > with your actual values.
curl 'https://<subdomain>.onelogin.com/api/2/users/<id>' \
-X GET \
-H "Authorization: bearer <access_token>"Have a Question?
Found a problem or a bug? Submit a support ticket.
Looking for walkthroughs or how-to guides? Check out our Knowledge Base.
Have a product idea or request? Share it in our Ideas Portal.