Loading data from web service is successful in Qlik View Desktop or Qlik Sense Desktop clients, when reloading user is manually logged into Windows.
Loading data from a web service in QlikView or Qlik Sense Enterprise server fails, when the reload is executed by the service user.
This issue can occur with any web service that requires user authentication, for example:
- Microsoft Sharepoint
- Microsoft Office 365
- Atlassian Confluence
This issue occurs regardless of web service location:
- Localhost
- Intranet
- Extranet
- Internet
The symptom can include document load errors like:
- Access denied
- Resource not available
- File does not exist
- General script error
This issue is related to user authentication to the web service, and the service user not having the required authentication token in its Windows session.
With a manually logged in Windows user the authentication to the web service might be done by Single Sign-On (SSO) or login form. In either case it technically means that the user has to pass some form of authentication step(s) before the web service or it resources are available to the user. For SSO consider that the authentication is automated and can involve automatic HTTP redirect to accomplish the authentication.
A successful authentication on the web service generates a authentication token in the user's Windows session. This means that the authenticated user can access the web service without re-authentication as long as the token and Windows session is valid.
A Windows user that runs a service will have a separate Windows session than the user being logged in manually in Windows. The authentication token generated for the manually logged in Windows user is not available for a Windows service run by the same user.
The issue can be resolved by enabling required authentication for the service account user while running the reload as a service. This can be done by accessing the web service prior to loading the content or by using a custom connector for the web service.
Accessing web service prior to content loadIn this scenario a user get authenticated automatically by visiting the web service. This is only possible if there is no need to fill in user credentials in a login dialog during the initial access to the web service.
The principle is to load what ever content the web service landing page returns and thereby enable the require authentication token. Typically this triggers a Single Sign-On (SSO) process that involves some HTTP redirects as part of accomplishing the user authentication.
In the example below the web service landing page is load as one text column with no labels, and then the table is dropped. After this the service user has a authentication token in the current Windows session and can access content from the web service.
TmpWebService:
LOAD @1
FROM [http://intranet.company.com/]
(txt, utf8, no labels, delimiter is \x3, no quotes);
DROP Table TmpWebService;
Custom Qlik connectorAny data source can be accessed through a custom connector.
Qlik Market provides easy overview and access to currently available connector from both Qlik and 3rd party providers. Notice, some connectors may require license fee to the provider, see connector details in
Qlik Market or contact connector provider for more details.
Explore the options for the relevant data source or web service and evaluate the available connectors to accomplish the require data load. If the current connectors do not comply with your web service or requirements, the remaining option is the develop your own custom connector as described in
Qlik Help developer guide for QVX SDK and Custom Connectors.
Execute authenticating scriptIn this scenario there is a known external script, program or batch file that enables the user authentication. The external enabler can be executed by running a
EXECUTE from the Qlik script prior to loading data from the web service, as described in
Qlik Help Qlik Support has no current knowledge if any way to accomplish this option, please consult web service provider for details on how this could be setup.