GET

Get User Apps

Use this API to get a list of apps that are assigned to a given user.

Resource URL

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

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 apps for.

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

Query Parameters

ignore_visibility

boolean

Defaults to false. When true will all apps that are assigned to a user regardless of their portal visibility setting.

Sample Responses

[
  {
      "id": 1127385,
      "icon_url": "/images/missing_connector_icon/square/mobile_50.png",
      "extension": false,
      "login_id": 415930448,
      "name": "OIDC Basic",
      "provisioning_status": "enabled",
      "provisioning_state": "unknown",
      "provisioning_enabled": false
  },
  {
      "id": 1181288,
      "icon_url": "https://cdn.onelogin.com/images/icons/square/amazonwebservices3multirole/mobile_50.png?1421095823",
      "extension": false,
      "login_id": 571984693,
      "name": "Amazon Web Services (AWS) Multi Role",
      "provisioning_status": "enabled",
      "provisioning_state": "unknown",
      "provisioning_enabled": false
  }
]

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
}

Response Elements

idThe App ID
icon_urlA url for the icon that represents the app in the OneLogin portal
extensionBoolean that indicates if the OneLogin browser extension is required to launch this app.
login_idUnqiue identifier for this user and app combination.
nameThe name of the app.
provisioning_statusOne of
  • enabling
  • disabling
  • enabling_pending_approval
  • disabling_pending_approval
  • enabled
  • disabled
  • disabling_failed
  • enabling_failed
provisioning_stateIf provisioning is enabled this indicates the state of provisioning for the given user. Will be one of
  • unknown
  • provisioning
  • modifying
  • deleting
  • provisioning_pending_approval
  • deleting_pending_approval
  • modifying_pending_approval
  • linking
  • provisioned
  • deleted
  • modifying_failed
  • provisioning_failed
  • deleting_failed
  • linking_failed
  • disabled
  • nonexistent
  • modifying_pending_approval_then_disabled
provisioning_enabledBoolean true/false to indicate if provisioning was enabled on this app.

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>/apps' \
-X GET \
-H "Authorization: bearer <access_token>"