Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

How to use Qlik Application Automation to manage space membership (groups)

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Madhushree_BP
Support
Support

How to use Qlik Application Automation to manage space membership (groups)

Last Update:

Jun 28, 2023 9:01:10 AM

Updated By:

Madhushree_BP

Created date:

Jun 28, 2023 8:57:54 AM

Attachments

This article provides an overview of how to manage space membership for groups using a Qlik Application Automation. This approach can be useful when migrating from QlikView, or Qlik Sense Client Managed, to Qlik Sense Cloud when security concerns prevent the usage of Qlik-CLI and Powershell scripting.

Environment

  • Qlik Application Automation

Prerequisites 

  • Access to Qlik Cloud tenant
  • User assigned the role of Tenant Admin
  • Office 365 account (for Microsoft Excel).

Sheet Configuration

In this example, we use Microsoft Excel to configure group Space memberships. A sheet name, for example, Groups, must be added and this must also be provided as input when running the automation. The sheet must also contain the following headers:

  • SpaceName
  • Group
  • Roles
  • Flag

Excel_headers.JPG

Automation Configuration

  1. Add an Input block that takes the name of the worksheet (from which data should be read) as input. You also need to specify the first and last cell to read data from, as well as if groups are to be added or deleted.
     Madhushree_BP_0-1682921748113.png
    • Worksheet Name: Name of the Excel Worksheet
    • Excel Start Cell: Enter the Start cell of your Excel Worksheet. Example: A1
    • Excel End Cell: Enter the End cell of your Excel Worksheet. Example: Z23
    • Mode: Add or Delete.

  2. Add two variables of the type number. One to keep track of added groups and one to keep track of deleted groups. These variables will be used to update the run title when the automation has been completed. Observe that only one of them would be used when running the automation since only one of the run modes can be used (Add or Delete).
    Let's call the variables as vGroupsAddedCounter and vGroupsDeletedCounter.

  3. Retrieve the information from the Excel sheets using the List Rows With Headers block.
    • Use the "do lookup" function to find the Drive ID and Item ID of the file you will be using as a source. 
    • Configure the other fields to get the values from the input fields.

      Madhushree_BP_0-1687956664207.png 

  4. Retrieve all the spaces from the tenant using the Search Spaces block inside the List Rows With Headers loop.

  5. Add a Condition block and check if the space exists and if we're in Add mode.

    Madhushree_BP_1-1687956755417.png

  6. If the condition is true, list all the members from the space using the List members from Space block by inputting the space ID. 

  7. Retrieve the groups using the Filter Groups block by inputting the filter condition.

    Madhushree_BP_0-1687339691477.png

  8. Add a Condition block that checks if the group exists and whether or not the group is a member of the space.

  9. If the conditions are true, add the group using the Add Member To Space block.

  10. After the Add Member To Spaceblock, add a variable block and increment vGroupsAddedCounter with 1.

  11. If the first condition in the List Rows With Headers loop is false, then use a third Condition block to find out if we're in Delete mode and if the space exists.

    Madhushree_BP_3-1687957024368.png

  12. If the condition is true, list all the members from the space using the List Members From Space block by inputting the space ID. 

  13. Retrieve the groups using the Filter Groups block by inputting the filter condition.

  14. Add a Condition block that checks if the group exists, and if the group is a member of the space and we delete it.

  15. If the condition is true, delete the group using Delete Member From Space block.

  16. After the Delete Member From Space block, add a variable block and increment vGroupsDeletedCounter with 1.

  17. Lastly, add a Condition block that checks the run mode and updates the automation's run title to display how many groups have been added or deleted.

    Madhushree_BP_3-1687340679872.png

     

Considerations

  • A multitenant scenario can be supported by utilizing the Qlik Platform Operations connector instead of the Qlik Cloud Services connector. 
  • Google Sheets could be used instead of Microsoft Excel.
Labels (1)
Comments
alphabutter9
Contributor
Contributor

@Madhushree_BP thank you for this documentation. How do you assign a user to a group? It doesn't seem like you can view groups in Qlik Cloud.

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @alphabutter9 

Users with a QlikID cannot be assigned to groups and groups cannot be managed in Qlik Cloud. Groups associated to users will always come from your custom identity provider (see Identity Providers).

We do have an idea active for allowing group management in Qlik Cloud directly. Please vote for it if you want to show your interest in this feature.

All the best,
Sonja 

Version history
Last update:
‎2023-06-28 09:01 AM
Updated by: