Get Current user applinks from external source using Javascript

Hi Team,

Greetings for the day. Hope you are doing great.

I am sending this email regarding one of the query to pull data from OKTA App links API. I have a requirement to show all the apps associated for current logged-in user. I have contacted one of the OKTA resource on API details and I got the URL as ***/api/v1/users/me/appLinks. I am able see the JSON data when I try to access the URL from Browser (I am already log-in to OKTA as we are using OKTA authentication for SharePoint and if log-in to SharePoint and access the site).

When I try to call the URL from JavaScript Ajax query it is throwing 403 error. (As OKTA save current user authentication details as cookie, I have passed the cookie value in the header) as shown the image below. (I am passing the cookie value from Header in the network). Could you please guide me how to get the data from API data from JavaScript. Please let me know if you need any other details.

1 Like