Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to connect to Qlik Sense Enterprise on Windows (Feb2024 P14) using powershell.
Does any one has any idea on why the Invoke-RestMethod throws an Unauthorized error message when passing credentials.
I am trying to apply the license on the host after installation of Qlik Sense using the /qrs/license POST call. But before making the POST call, i am trying to make a GET call to create a session cookie.
Using below headers & parameters.
$hdrs = @{
"X-Qlik-Xrfkey" = "YtgzDNRkxCjXdyut"
}
$contentType = 'application/json'
$reqUrl = https://hostname/qrs/about?xrfkey=YtgzDNRkxCjXdyut
The below request does not work and throws the error (401) Unauthorized. Even though the credential parameter has the correct credentials passed. I have verified this multiple times by logging the username and password from the credential object used here.
Invoke-RestMethod -Uri $reqUrl -Credential $cred -Method Get -Headers $hdrs -ContentType $contentType -SessionVariable websession
The below request works. But proceeds to use the loggedin users credentials. I do not want to use the logged-in users credentials as the loggedin user is not the QlikAdmin service account user, but a local windows Admin account.
Invoke-RestMethod -Uri $reqUrl -UseDefaultCredentials -Method Get -Headers $hdrs -ContentType $contentType -SessionVariable websession
Any update will help.
There is a PowerShell module for the QRS APIs included in the tools folder of your Qlik Sense install.
It includes functions for all the QRS APIs.
Assuming you have installed in the default directory.(If you copy the module Folder to another machine you can also use it to remotely connect)
There is a PowerShell module for the QRS APIs included in the tools folder of your Qlik Sense install.
It includes functions for all the QRS APIs.
Assuming you have installed in the default directory.(If you copy the module Folder to another machine you can also use it to remotely connect)