Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jshashiv
Contributor
Contributor

SAML Attribute Map from QlikCli

Hi Team,

I m creating SAML virtual proxy from Qlik-cli and got stuck as SAML attribute map parameter. This parameter takes hashtable as input so i used below code . In powershell, I created variable $hash and provided all the required parameters . I am passing this $hash to -samlAttributeMap (please check at end of the script). 

After executing the script, I m getting error "The remote server returned an error: (400) Bad Request". Can anyone please help me how to achieve this ?

 

 

Connect-Qlik -TrustAllCerts

$hash = @{ Role = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role"; Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"; Name = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"}

New-QlikVirtualProxy -description SAML_rim -sessionCookieHeaderName X-Qlik-Session-SAML -authenticationMethod SAML -prefix saml -samlAttributeUserDirectory [SAML] -samlAttributeUserId http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn -samlEntityId 9822314-dev -samlHostUri https://dataviz.gcp.cloud.uk/ -samlSigningAlgorithm sha256 -sessionInactivityTimeout 30 -loadBalancingServerNodes ce4e22bd-b472-466e-b9c2-e8c004dc644d -websocketCrossOriginWhiteList dataviz.gcp.cloud.uk -samlAttributeMap $hash

 

 

 

1 Solution

Accepted Solutions
Damien_V
Support
Support

Hello @jshashiv 

The documentation on this JSON structure is available here:

https://help.qlik.com/en-US/sense-developer/May2021/APIs/RepositoryServiceAPI/index.html?page=1860

If you are unsure about how it should be, you can also check it in the browser devtools when you try to perform the same action in the QMC.

I can see that the structure should be the following:

[{"samlAttribute":"attribute1","senseAttribute":"attributesense1","isMandatory":true},{"samlAttribute":"attribute2","senseAttribute":"attributesense2","isMandatory":true}]

 

Damien_Villaret_0-1625468629810.png

 

If the issue is solved please mark the answer with Accept as Solution.

View solution in original post

1 Reply
Damien_V
Support
Support

Hello @jshashiv 

The documentation on this JSON structure is available here:

https://help.qlik.com/en-US/sense-developer/May2021/APIs/RepositoryServiceAPI/index.html?page=1860

If you are unsure about how it should be, you can also check it in the browser devtools when you try to perform the same action in the QMC.

I can see that the structure should be the following:

[{"samlAttribute":"attribute1","senseAttribute":"attributesense1","isMandatory":true},{"samlAttribute":"attribute2","senseAttribute":"attributesense2","isMandatory":true}]

 

Damien_Villaret_0-1625468629810.png

 

If the issue is solved please mark the answer with Accept as Solution.