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: 
makunii
Partner - Contributor III
Partner - Contributor III

qlik sense api powershell user email

Hello all,

I would like to know if it is possible to connect to Qlik Sense API via Powershell and take the user email attribute.

I connected to URL https://<sense>:4242/qrs/user/full?xrfkey=12345678qwertyui"

I expanded the attributes field, like this:  $variable | select -ExpandProperty attributes

At this point, I do not know how to take the name and email attributes from my Qlik Sense Environment users.

Does anyone know how to do that?

I appreciate any help you can provide.

Regards,

Marco

Labels (2)
1 Solution

Accepted Solutions
Marc
Employee
Employee

If you use QlikSenseCLI

https://github.com/QlikProfessionalServices/QlikSenseCLI/

you may find structuring these api calls much easier.

 

Based on what you are asking for, I suspect that Option 2 below may best suit your needs

#option 1
Connect-QlikSense -TrustAllCertificates -Hostname "ifRequired" -VirtualProxy "ifRequired" 
$users = Get-QSUser -Full
foreach($user in $users){
$EmailAddress = $($user.Attributes|?{$_.AttributeType -eq "Email"}).Attributevalue
$EmailAddress 
}

#option 2
Connect-QlikSense -TrustAllCertificates -Hostname "ifRequired" -VirtualProxy "ifRequired" 
$users = Get-QSUser -Full
#Calculated properties
$users|Select-Object -Property id,Name,@{Name="Email";E={$($_.Attributes|?{$_.AttributeType -eq "Email"}).Attributevalue}}

 

View solution in original post

1 Reply
Marc
Employee
Employee

If you use QlikSenseCLI

https://github.com/QlikProfessionalServices/QlikSenseCLI/

you may find structuring these api calls much easier.

 

Based on what you are asking for, I suspect that Option 2 below may best suit your needs

#option 1
Connect-QlikSense -TrustAllCertificates -Hostname "ifRequired" -VirtualProxy "ifRequired" 
$users = Get-QSUser -Full
foreach($user in $users){
$EmailAddress = $($user.Attributes|?{$_.AttributeType -eq "Email"}).Attributevalue
$EmailAddress 
}

#option 2
Connect-QlikSense -TrustAllCertificates -Hostname "ifRequired" -VirtualProxy "ifRequired" 
$users = Get-QSUser -Full
#Calculated properties
$users|Select-Object -Property id,Name,@{Name="Email";E={$($_.Attributes|?{$_.AttributeType -eq "Email"}).Attributevalue}}