Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. READ MORE

How to: Use Qlik Application Automation to manage space membership (users)

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

How to: Use Qlik Application Automation to manage space membership (users)

Last Update:

Jun 15, 2023 6:06:02 AM

Updated By:

Sonja_Bauernfeind

Created date:

Jun 15, 2023 6:48:01 AM

Attachments

This article provides an overview of how to manage Space membership for users using 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.

You will find an automation attached to this article that works with the Microsoft Excel connector. More information on importing automations can be found here.

Content:

 

Prerequisites

  • Access to a 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 users' Space memberships. A sheet name, for example, Members, must be added and this must also be provided as input when running the automation. The sheet must also contain these headers: SpaceName, email, roles, and Flag.

Example of sheet configuration:

Excel Sheet Configuration Example.png

When adding roles, each role in the roles list must be within double quotes and the Flag column must be set to add. If users are to be deleted, there is no need to include roles, but Flag must be set to delete.

The spaces and users you supply must exist; this automation will not create them.

 

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 users are to be added or deleted.

    Input block.png

  2. Add two variables of the type number. One to keep track of added users and one to keep track of deleted users. 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 vUsersAddedCounter and vUsersDeletedCounter.

  3. Add a List Rows With Headers block to read the values that have been configured in the Excel sheet. 

    • 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.

      List Rows with Headers.png

  4. Inside the List Rows With Headers loop, add the Qlik Cloud Services block Search Spaces.

    Search Spaces.png

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

    Add a Condition.png

  6. If the conditions are true, use the Qlik Cloud Services block List Members From Space.

    List Members from Space.png

  7. Add the Qlik Cloud Services block Search Users.

    Search Users.png

  8. Add a second Condition block that checks if the user exists and is not a member of the space.

    Add a second condition.png

  9. If the conditions are true, use the Qlik Cloud Services block Add Member To Space

    Add Member to Space.png

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

    Variable vusersaddedcounter.png

  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. 

    List Rows with Headers loop.png

  12. If the conditions are true, use the Qlik Cloud Services blocks List Members From Space.

    List Members from Space 2.png

  13. Add the Qlik Cloud Services block Search Users.

    Search users block two.png

  14. Add a fourth Condition block that checks if the user is a member of the space.

    Check if user is a member of the space.png

  15. If the Condition is true, use the Qlik Cloud Services block Delete Member From Space.

    Delete Member from Space.png

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

    vUsersDeletedcounter.png

  17. The last part of this automation is a fifth Condition block that checks the run mode and updates the automation's run title to display how many users have been added or deleted.

    fifth condition block.png

 

Running the Automation

When running the automation you must provide input to the automation. This includes the name of the worksheet to read data from. You also need to specify the first and last cell to read data from, as well as if users are to be added or deleted.

Example:

Input Value

Worksheet Name

Members

Excel Start Cell

A1

Excel End Cell

D15

Mode

Add

 

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.

 

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

Labels (1)
Version history
Last update:
‎2023-06-15 06:06 AM
Updated by: