GET

Get User Delegated Privileges

Use this API to get back a single user’s delegated privileges from a OneLogin account.

Resource URL

https://<subdomain>.onelogin.com/api/2/users/:id/delegated_privileges

Header Parameters

Authorization

required

string

Set to bearer:<access_token>.

Set <access_token> to the access token you generated using the Generate Token API.

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: Read Users, Manage users, Read All, or Manage All.

Resource Parameters

id

required

integer

Set to the id of the user that you want to return.

If you don't know the user's id, use the List Users API call to return all users and their id values.

Sample Responses

[
   {
       "description": "",
       "id": "41964544-4745-4b0e-a030-5eb1d0bdf7fa",
       "name": "Manage Roles for Manufacturing Division"
   },
   {
       "description": "Update Description",
       "id": "a4692249-159f-40ec-a477-81ed6460445e",
       "name": "Roles - Manage Users/Apps"
   }
]

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.

Run in Postman

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>"