Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a ASP.Net Core web app, I am connecting to Qlik SaaS via an APIKey. (location.AsApiKey())
This is causing me an issue because I need each user to be able to apply a specific selection (using app.GetField().Select()) to the Qlik app so that they only see data relevant to them.
Since an APIKey is tied to a specific/single Qlik user account this means that each user of my web app will be applying different selections to the same user session which won't work.
What is the best way to connect to a Qlik Saas app to allow each user to have their own session?
Is there a way to pass user accounts/details to Qlik SaaS? or create a new session for each request to the API?
Apologies if I have made mistakes in my explanation/understanding, I am a junior dev!
Thanks,
Josh
An API key is strictly tied to a specific user, so if you authenticate using such a key, then you will end up as accessing the system as that user only. But you can still make multiple connections to Qlik SaaS that have independent sessions (or selection states if you like). You achieve this by specifying a session token in the second argument to method IQcsLocation.App:
So instead of doing:
var app = location.App(appId);
You do:
var app = location.App(appId, SessionToken.Custom("mytoken"));
Or possibly this to get a guaranteed unique session:
var app = location.App(appId, SessionToken.Unique());
An API key is strictly tied to a specific user, so if you authenticate using such a key, then you will end up as accessing the system as that user only. But you can still make multiple connections to Qlik SaaS that have independent sessions (or selection states if you like). You achieve this by specifying a session token in the second argument to method IQcsLocation.App:
So instead of doing:
var app = location.App(appId);
You do:
var app = location.App(appId, SessionToken.Custom("mytoken"));
Or possibly this to get a guaranteed unique session:
var app = location.App(appId, SessionToken.Unique());
Perfect thanks @Øystein_Kolsrud