Get Apps for a User
Get a list of apps accessible by a user, not including personal apps.
To get a list of apps accessible by a user to embed in your company intranet, for example, see Get Apps to Embed for a User.
Resource URL
Before calling this API, consider using its version /2 equivalent.
https://<subdomain>/api/1/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 |
Sample Response
- 200 OK
- 400 Bad Req.
- 401 Unauth.
- 403 Forbid.
- 404 Not Found
{
"status": {
"error": false,
"code": 200,
"type": "success",
"message": "Success"
},
"data": [
{
"id": 436448,
"name": "AWS DynamoDB Multi Role Production",
"icon": "https://image.com/mobile_50.png?1421095823",
"provisioned": "unknown",
"extension": false,
"login_id": 66666666,
"personal": false
},
{
"id": 482932,
"name": "Workplace by Facebook",
"icon": "https://image.com/mobile_50.png?1431478030",
"provisioned": "unknown",
"extension": false,
"login_id": 99999999,
"personal": false
},
{
"id": 415452,
"name": "NetFlix",
"icon": "https://image.com/mobile_50.png?1427292256",
"provisioned": null,
"extension": true,
"login_id": 88888888,
"personal": false
}
]
}
This is what a 200 OK
response looks like with no app results:
{
"status": {
"error": false,
"code": 200,
"type": "success",
"message": "Success"
},
"data": [
[]
]
}
Typically, this error means that your Authorization
header value is missing or incorrectly formatted. The Authorization
header value should use this format: bearer:<access_token>
.
{
"status": {
"error": true,
"code": 400,
"type": "bad request",
"message": "Authorization Information is incorrect"
}
}
Typically, this error means that your access token value is invalid.
{
"status": {
"error": true,
"code": 401,
"type": "Unauthorized",
"message": "Authentication Failure"
}
}
{
"status": {
"error": true,
"code": 403,
"type": "forbidden",
"message": "user is not authorized to access this User"
}
}
{
"status": {
"error": true,
"code": 404,
"type": "not found",
"message": "User for id 111111111 was not found"
}
}
Response Fields
|
Indicates whether the app requires the OneLogin browser extension to login. Valid values are:
|
|
URL to the app’s icon. |
|
ID of the app that can be accessed by the user. |
|
User’s ID in the app. For example, in one app the user’s ID may be |
|
Name of the application. |
|
Indicates whether the app is a user’s personal app. Valid values are:
|
|
Indicates whether a username and password has been stored on the login for the app and user. Valid values are:
|
Postman Collection
- 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/1/users/<user_id>/apps' \
-X GET \
-H "Authorization: bearer: <access_token>"
Python
See Work with OAuth 2.0 Tokens, Users, and Roles.
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.