Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
lachlanwwells
Partner - Contributor III
Partner - Contributor III

401 Error during embedding using OAuth clients

Hi all,
We are embedding a Qlik SaaS app into a portal by using the following documentation and OAuth client and session storage:

https://qlik.dev/embed/qlik-embed/authenticate/connect-qlik-embed/#using-oauth-clients

Upon doing this we experience two 401 issues.


Issue 1: 3rd party extensions are not displayed, and a 401 error is shown in the console.

To confirm this behavior, we have built a test 3rd party extension following these instructions: https://qlik.dev/extend/extend-quickstarts/first-extension/ and the issue is still present.

If loaded directly in Qlik Sense client UI, it works fine, if loaded when embedded it does not

issue1a.pngissue1b.png

We've noticed they are loading the extension script by just using a <script> tag in. Which works for normal browsing, however it means it won't send the 'Authorization' header that's required (since cookie auth won't work using their library) - the auth header is how they are getting around the third party cookie issue, but if you load the script with a regular script tag you can't embed the auth header so it's giving a 401. This seems to be why it works if you login to Qlik in another window then load the iframe because the cookie is there for when the request is processed... They need to load the script dynamically so they can use the auth headers for qlik-embed"

Issue 2: After performing the auth process, the other embeds are displayed as expected however we receive a 401 Error from the /spaces API endpoin

issue2.png
it seems like the Qlik /api/v1/spaces default request also doesn't have the authorization header which means it also doesn't load and we are not sure what's triggering the spaces request though as it's in their JS librieis.

Qlik support tells us this isn't their problem so hoping the community can help us.

Thanks in advance!

Lachlan

Labels (4)
7 Replies
Anil_Babu_Samineni

@lachlanwwells For me this sounds like you have some issue with web socket and protocol (Between http and https). 

#1. Can you go here and check if the extensions available in the first place https://yourdomain.qlikcloud.com/console/extensions.

#2.Did you added the Auth domain into Whitelist? 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Albert_Candelario

Hello @lachlanwwells,

Has this been resolved or are you still experiencing this?

Cheers,

Albert

Please, remember to mark the thread as solved once getting the correct answer
lachlanwwells
Partner - Contributor III
Partner - Contributor III
Author

Hi there,

Thanks for your reply!

Everything is running through https - the extensions are available as it works when it is displayed in app within the Qlik Cloud interface, just as soon as the same app is displayed embedded using the Qlik embed libraries, it displays that error

 

Yes - the auth domains are in the whitelist also

 

lachlanwwells
Partner - Contributor III
Partner - Contributor III
Author

Hi @Albert_Candelario, no we are still experiencing this issue

Anil_Babu_Samineni

@lachlanwwells To be sure, Where you are using embedded (Is this externally like some Web portals?). If this is Mashup, It must OK in general.

The reason I ask, There might some firewall blocking to access externally to Qlik sense content (Like extensions). 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Albert_Candelario

Hello @lachlanwwells ,

Is the error happening all the time? or is intermittent?

Cheers,

Albert

Please, remember to mark the thread as solved once getting the correct answer
lachlanwwells
Partner - Contributor III
Partner - Contributor III
Author

The error is constant - our developer has been looking into it, but as we're using the qlik.dev libraries, and the issue is auth related on the QCS side, there doesn't look to be much else we can do without the assistance of Qlik