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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Linda95
Partner - Contributor
Partner - Contributor

Tabular Reporting Tasks based on IdP Groups

Is there currently a way to plan report tasks based on active directory groups? Or do you plan implementing an integrated way to use the IdP Connection for that? Would be much easier than maintaining an excel file.

Labels (1)
  • SaaS

2 Replies
Andrew_Kruger
Employee
Employee

Good news @Linda95  you can source your distribution list form other connected sources(avoiding the excel file) - see https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Reporting/cloud-in-app-r... and the section Defining the distribution list manually in the load script.   You will have to replicate the DL schema of the excel file in your source e.g. add the filter names you need and the group names you want to use in the reporting tasks.  We do anticipate this will be a preferred strategy over time.  

JonnyPoole
Former Employee
Former Employee

@Linda95  certain IdP groups are available using the load script to load users (and optionally groups).  

The trick is to use the 'users' endpoint with the Qlik REST Connector to pull the list of IdP groups from your tenant.  Create a new REST connection as below pointing to the URL of your tenant's users endpoint:

 

https://<tenant>.<region>.qlikcloud.com/api/v1/users

JonnyPoole_0-1704203548978.png

You will also need an 'API key' (which must be pre-generated) and then pasted into the Query headers section of the REST Connection. 

The query header name is 'Authorization' (you must type this out manually). 

The value is set to 'Bearer <APIKEY>' 

JonnyPoole_1-1704203678164.png

The groups are available under 'assignedGroups' (see below)

JonnyPoole_2-1704203862267.png

 

Keep in mind you will only see the groups for the members have already logged into Qlik Cloud. The tenant is only becomes aware of IdP groups when it gets the group memberships from the IdP at the time of login. 

I've adjusted the load script to join the groups and users together, and rename and hide the recipient fields

JonnyPoole_3-1704204517357.png

 

After rerunning the load script, you will see the Idp groups under 'groups' with the correct memberships. 

JonnyPoole_4-1704204583979.png

 

In case you want to copy my script for editting, here it is pasted out:  

set hideprefix='%';
 
LIB CONNECT TO 'Qlik Cloud Users Endpoint';
 
RestConnectorMasterTable:
SQL SELECT 
"__KEY_root",
(SELECT 
"name" AS "name_u2",
"email",
"__KEY_data",
"__FK_data",
(SELECT 
"name" AS "name_u1",
"__FK_assignedGroups",
"__KEY_assignedGroups"
FROM "assignedGroups" PK "__KEY_assignedGroups" FK "__FK_assignedGroups")
FROM "data" PK "__KEY_data" FK "__FK_data")
FROM JSON (wrap on) "root" PK "__KEY_root";
 
UserGroups:
LOAD [name_u1] AS %Group,
[__FK_assignedGroups] AS %UserID
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_assignedGroups]);
 
 
LEFT JOIN (UserGroups)
LOAD [name_u2] AS %Name,
[email] AS %Email,
[__KEY_data] AS %UserID
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_data]);
 
DROP TABLE RestConnectorMasterTable;
 
tag field %Name with 'DL_DISTRIBUTION_SVC__recipientName';
tag field %Email with 'DL_DISTRIBUTION_SVC__recipientEmail';
tag field %Group with 'DL_DISTRIBUTION_SVC__groupsName';
//tag field %Filters with 'DL_DISTRIBUTION_SVC__recipientFilters';