Get User Apps
Use this API to get a list of apps that are assigned to a given user.
Resource URL
https://<subdomain>/api/2/users/:id/apps
Header 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 |
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
- 200 OK
- 401 Unauthorized
- 404 Not Found
[
{
"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
id |
The App ID |
icon_url |
A url for the icon that represents the app in the OneLogin portal |
extension |
Boolean that indicates if the OneLogin browser extension is required to launch this app. |
login_id |
Unqiue identifier for this user and app combination. |
name |
The name of the app. |
provisioning_status |
One of
|
provisioning_state |
If provisioning is enabled this indicates the state of provisioning for the given user. Will be one of
|
provisioning_enabled |
Boolean true/false to indicate if provisioning was enabled on this app. |
Postman Collection
Replace sample variables indicated by {{ }}
with your actual values.
- Clicking Run in Postman button navigates to the page where you can fork the collection to your workspace. Forking the collection into your workspace will enable you to contribute to the source collection using pull requests. You can also view the collection in a public workspace if you like and even import a copy of the collection using the links present on the screen.
Sample Code
cURL
Replace sample values indicated by < >
with your actual values.
curl 'https://<subdomain>/api/2/users/<id>/apps' \
-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 on OneLogin's user and admin features? Check out the documentation in our Knowledge Base.
Have a product idea or request? Share it with us in our Ideas Portal.