/appLinks returns an empty array but user is assigned an application

I too was wondering why appLinks returns empty, using an API token when attempting to retrieve a user’s linked apps.

The answer might be here:
https://support.okta.com/help/s/article/Why-do-results-vary-when-referencing-the-applinks-API-endpoint-from-a-Browser-or-from-a-different-medium?language=en_US

The Apps returned via /appLinks are the App Cards seen on the user’s dashboard. If a user is assigned to an application that has the Login initiated by set to either Okta or App , and Application visibility is set to Display application icon to users - it will appear.
Please note that the API call /api/v1/users/{{UserID}}/appLinks , when performed through a token, will not have access to the Personal Apps set up and managed by the end user. Conversely, if the call is performed through the browser, by the user who has a session, it will have access to the Personal Apps set up by the end user, who are only visible for him.

The documentation at Users | Okta Developer does not mention this restriction.

(related, closed, topic: User API - appLinks returns 0 results)

To see if a user is an assigned to an app:

/api/v1/apps/{$applicationId}/users/{$userId}

That will return an Application User if the user is assigned to the app. This requires you knowing the applicationId and the userId must be a user.id (not the user.login)

hope this helps someone!

1 Like