Configure a tenant with Platform Operations

Configure a tenant

Automated tenant configuration is an important step, irrespective of use case. In this tutorial, you will:

  • Set license assignment settings
  • Seed groups to the tenant for preparing access control
  • Set up spaces ready for analytics content deployment
  • Assign members to these spaces
  • Disable an unwanted tenant feature

This example seeds a set of groups, and creates a dev-finance shared space with the Developer group assigned full access, and a Finance managed space with the Developer group assigned full access, and the Finance group assigned consume access.

For more information on how to achieve this via Qlik APIs and toolkits, review the pro-code Configure a tenant tutorial.

Requirements

  • A Qlik Cloud tenant with access to Qlik Application Automation.
  • Valid OAuth client with access to the tenants on which you wish to run the automation.
  • Access to a target tenant.

Variables you need to complete this tutorial

  • targetTenant: The hostname for your target Qlik Cloud tenant (for example targettenant.eu.qlikcloud.com).

Configuration

Drag a Get Tenant Name And Region block onto your Start block. This should be configured with the Hostname set to targetTenant.

Browser window showing the get tenant block

Add a Update Tenant Auto License Assignment block, set the Tenant to the Get Tenant Name And Region block, and the automatic assignment rules to match your requirements. This controls what licenses new users are created by default in the tenant.

Browser window showing the Update Tenant Auto License Assignment block

Add a Update Auto Create Group Settings block, set the Tenant to the Get Tenant Name And Region block, and set Enable Auto Group Creation to true. This is required for seeding groups in the tenant.

Browser window showing the Update Auto Create Group Settings block for the target tenant

Add a Create Group block, set the Tenant to the Get Tenant Name And Region block, and enter the groups you wish to deploy to the tenant. This example deploys 5 groups: developers, sales, marketing, finance, and administrators.

Browser window showing the Create Group block on the target tenant

Add a List Groups block, and set the Tenant to the Get Tenant Name And Region block. This will return the newly created groups.

Browser window showing the List Groups block

Add a Create Space block, set the Tenant to the Get Tenant Name And Region block, and add attributes to create a shared space for developers. In this example, the shared space will be named dev-finance, and show the description A development space for finance apps.

Browser window showing the create space block

Add a Filter List block, set the List to the List Groups block, and filter the results to return only where name equals developers. You will need the ID for this group when assigning it to a space.

Browser window showing the Filter List block

Add a Add Member To Space block, set the Tenant to the Get Tenant Name And Region block, the Space ID to the ID of the space created using the Create Space block, the Assignee ID to the ID of the group returned by the Filter List block, the Roles to ["codeveloper", "consumer", "dataconsumer", "facilitator", "producer"], and the Type to group.

Note: While this example shows the addition of a single group, moving the Add Member To Space block to the loop on the Filter List block would allow you to assign multiple groups to the space with no additional blocks.

Browser window showing the Add Member To Space block

Add another Create Space block, set the Tenant to the Get Tenant Name And Region block, and add attributes to create a managed space for finance users. In this example, the managed space will be named Finance, and show the description A space for finance apps.

Browser window showing the Create space block

Add another Filter List block, set the List to the List Groups block and filter the results to return only where name equals finance. You will need the ID for this group when assigning it to a space.

You will use the output of both this block and the previous Filter List block to add both the Developers and Finance groups to the space.

Browser window showing the Filter List block

Add a Add Member To Space block, set the Tenant to the Get Tenant Name And Region block, the Space ID to the ID of the space created using the Create Space block, the Assignee ID to the ID of the group returned by the second Filter List block, the Roles to ["consumer"], and the Type to group.

This will provide the Finance group with consume access to the Finance managed space.

Browser window showing the Add Member To Space block

Add another Add Member To Space block, set the Tenant to the Get Tenant Name And Region block, the Space ID to the ID of the space created using the second Create Space block, the Assignee ID to the ID of the group returned by the first Filter List block, the Roles to ["consumer", "contributor", "dataconsumer", "facilitator", "publisher"], and the Type to group. Note that these roles are different than the previous assignment, as the space type is different.

This will provide the Developers group with full access to the Finance managed space.

Browser window showing the Add Member To Space block

Add a Update Notes Settings block, set the Tenant to the Get Tenant Name And Region block, and both the Note Toggle and Snapshot Relations values to false. This will turn off the Notes feature in the tenant for all users.

This is an example of how you can customize different tenants to suit different use cases or customer profiles.

Browser window showing the Update Notes Settings block

Add a List Spaces block, and set the Tenant to the Get Tenant Name And Region block. This will return the spaces in the tenant as well as their configuration.

Browser window showing the List Spaces block

Add a Output block, set the Data to output to the List Groups block, to output this to the run screen on execution.

Browser window showing the Output block

Add a Output block, set the Data to output to the List Spaces block, to output this to the run screen on execution.

Browser window showing the Output block

Select Run to trigger the automation. The output will return the group and space metadata created on the targetTenant.

Browser window showing the output of the automation on the run screen

The Platform Operations connector includes blocks for many other features and capabilities in Qlik Cloud.

Full automation snippet

Full automation snippet

To import this snippet to your own automation, either:

  • Save as a JSON file, right click the canvas in an automation, and select Upload workspace.
  • Copy the snippet to the clipboard, right click the canvas in an automation, and select Paste blocks.

{"blocks":[{"id":"9FB7801F-01D4-4F93-AB39-A0BA58A10448","type":"StartBlock","disabled":false,"name":"Start","displayName":"Start","comment":"","childId":"E6DF7A2F-FC9D-4865-B9CA-876832E6E7A7","inputs":[{"id":"run_mode","value":"manual","type":"select","structure":{}}],"settings":[],"collapsed":[{"name":"loop","isCollapsed":false}],"x":0,"y":0},{"id":"E6DF7A2F-FC9D-4865-B9CA-876832E6E7A7","type":"SnippetBlock","disabled":false,"name":"GetTenantNameAndRegion","displayName":"Qlik Platform Operations - Get Tenant Name And Region","comment":"","childId":"3F786AA8-715F-4F05-AD6C-22CA5D7C4121","inputs":[{"id":"575d1740-b1e2-11ed-958a-598edfec33b8","value":"https://m5lzzggz5xn60m5.eu.qlikcloud.com","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-317,"y":196,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","snippet_guid":"bd5c1ce0-ad14-11ed-83f6-1d42e53790dd"},{"id":"3F786AA8-715F-4F05-AD6C-22CA5D7C4121","type":"EndpointBlock","disabled":false,"name":"updateTenantAutoLicenseAssignSettings","displayName":"Qlik Platform Operations - Update Tenant Auto License Assign Settings","comment":"","childId":"5991268A-2488-452A-90C0-DC2FA61ADC31","inputs":[{"id":"a0ce7700-239f-11ed-ab0c-9d038ca21306","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"69c04230-23a0-11ed-b036-9d6150716e4b","value":"true","type":"select","structure":{}},{"id":"849f2d30-23a0-11ed-8784-2b137512fd57","value":"false","type":"select","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-288,"y":373,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"a0b2ef50-239f-11ed-b2b1-7b3daf24eda9","endpoint_role":"update"},{"id":"2B645B4D-3EDF-442F-9BE9-5FB1DE02086D","type":"SnippetBlock","disabled":false,"name":"CreateGroup","displayName":"Qlik Platform Operations - Create Group","comment":"","childId":"5D868629-EFCA-4602-B024-4D53A1EB5162","inputs":[{"id":"877a5da0-9e4d-11ed-8451-99449deb1773","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"877b6e80-9e4d-11ed-9b16-ebf226e3c86c","value":"developers,sales,marketing,finance,administrators","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":24,"y":681,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","snippet_guid":"8766b8d0-9e4d-11ed-b46c-05088f78e2de"},{"id":"6E5FB91C-53A0-4847-9BB6-954719D08129","type":"EndpointBlock","disabled":false,"name":"createSpace","displayName":"Qlik Platform Operations - Create Space","comment":"","childId":"EE07E2F0-FC6F-4885-B211-7E97B827B0DE","inputs":[{"id":"259d5fb0-eb0b-11ec-86d9-199f676a752d","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"ac076300-eb0a-11ec-b583-0fbc8b1515af","value":"dev-finance","type":"string","structure":{}},{"id":"b8bb0400-eb0a-11ec-a73b-0fd8e1a85cad","value":"be2ded30-eb0a-11ec-8c57-cde756de2b10","type":"select","displayValue":"shared","structure":{}},{"id":"e2622970-eb0a-11ec-8c26-21e40f237a36","value":"A development space for finance apps","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-15,"y":854,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"6e753120-eb0a-11ec-95bc-8ba5cf12f207","endpoint_role":"create"},{"id":"5D868629-EFCA-4602-B024-4D53A1EB5162","type":"EndpointBlock","disabled":false,"name":"listGroups","displayName":"Qlik Platform Operations - List Groups","comment":"","childId":"6E5FB91C-53A0-4847-9BB6-954719D08129","inputs":[{"id":"11f12bd0-7ae8-11ed-89b1-45f8bc9d015a","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"maxitemcount","value":"","type":"string","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"cache","value":"0","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":10,"y":841,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"11c73d90-7ae8-11ed-b1a2-afac6315a0ff","endpoint_role":"list"},{"id":"EE07E2F0-FC6F-4885-B211-7E97B827B0DE","type":"FilterListBlock","disabled":false,"name":"filterList","displayName":"Filter over Qlik Platform Operations - List Groups - Filter List","comment":"","childId":"A125BBF4-3740-4772-A401-7C96F5736ED4","inputs":[{"id":"list","value":"{ $.listGroups }","type":"string","structure":{}},{"id":"conditions","value":{"mode":"all","conditions":[{"input1":"name","operator":"=","input2":"developers"}]},"type":"custom","structure":{}}],"settings":[{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-278,"y":598.503662109375},{"id":"86EE213F-44E5-4478-8CF3-A0F4BFA4DB45","type":"EndpointBlock","disabled":false,"name":"createSpace2","displayName":"Qlik Platform Operations - Create Space 2","comment":"","childId":"24240F04-58F5-4ABE-A968-FD8275DA2A5D","inputs":[{"id":"259d5fb0-eb0b-11ec-86d9-199f676a752d","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"ac076300-eb0a-11ec-b583-0fbc8b1515af","value":"Finance","type":"string","structure":{}},{"id":"b8bb0400-eb0a-11ec-a73b-0fd8e1a85cad","value":"c27c90f0-eb0a-11ec-a9ea-653198c16b16","type":"select","displayValue":"managed","structure":{}},{"id":"e2622970-eb0a-11ec-8c26-21e40f237a36","value":"A space for finance apps","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":451,"y":914.4482421875,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"6e753120-eb0a-11ec-95bc-8ba5cf12f207","endpoint_role":"create"},{"id":"24240F04-58F5-4ABE-A968-FD8275DA2A5D","type":"FilterListBlock","disabled":false,"name":"filterList2","displayName":"Filter over Qlik Platform Operations - List Groups - Filter List 2","comment":"","childId":"8633CD6D-2ACC-415B-BCAA-88D68ABA4F6B","inputs":[{"id":"list","value":"{ $.listGroups }","type":"string","structure":{}},{"id":"conditions","value":{"mode":"some","conditions":[{"input1":"name","operator":"=","input2":"finance"}]},"type":"custom","structure":{}}],"settings":[{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":463,"y":1070.558837890625},{"id":"8633CD6D-2ACC-415B-BCAA-88D68ABA4F6B","type":"EndpointBlock","disabled":false,"name":"addMemberToSpace","displayName":"Qlik Platform Operations - Add Member To Space","comment":"","childId":"0DB7ADA2-C800-4758-9A0E-CA85D4599C81","inputs":[{"id":"2bbdd560-23a2-11ed-998f-858ca361c79f","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"2ba4a130-23a2-11ed-9472-e7f47c82203b","value":"{$.createSpace2.id}","type":"string","structure":{}},{"id":"2bb4fbb0-23a2-11ed-b297-0165721c1b96","value":"{$.filterList2[0].id}","type":"string","structure":{}},{"id":"8c8f4fd0-23a2-11ed-ada7-b5bcc6e7e0b4","value":"[\"consumer\"]","type":"string","structure":{}},{"id":"2bacb5f0-23a2-11ed-846d-bb4022e4aa33","value":"2bb40360-23a2-11ed-9595-55706cb7bee7","type":"select","displayValue":"group","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":0,"y":1440,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"2b916d90-23a2-11ed-91e7-1156a32207d1","endpoint_role":"create"},{"id":"E5CC3A9C-360F-418F-BC53-255E96CCB813","type":"EndpointBlock","disabled":false,"name":"TriggerEnableNotesSettings","displayName":"Qlik Platform Operations - Update Notes Settings","comment":"","childId":"E8214A87-FC0D-4F59-82F8-A609B64EB09E","inputs":[{"id":"041ef960-ce0d-11ed-a397-a3bbeac9badc","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"04189bb0-ce0d-11ed-8052-a522c1e6f51d","value":"false","type":"select","structure":{}},{"id":"04265720-ce0d-11ed-adb6-f5c56c4c60ce","value":"false","type":"select","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":0,"y":1800,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"03fd3830-ce0d-11ed-b3c7-1770e38435ad","endpoint_role":"update"},{"id":"E8214A87-FC0D-4F59-82F8-A609B64EB09E","type":"EndpointBlock","disabled":false,"name":"listSpaces","displayName":"Qlik Platform Operations - List Spaces","comment":"","childId":"AA19C3C2-0225-4FBD-A963-AA76C527D39F","inputs":[{"id":"7717d000-eb0e-11ec-9b55-c70a3d793cb2","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"cf8b5510-d90e-11ed-a579-cd38900fbf47","value":null,"type":"string","structure":{}},{"id":"1d91e290-d90f-11ed-80ea-9fec14e6d987","value":null,"type":"string","structure":{}},{"id":"71ea7180-d90f-11ed-a399-43da6346f683","value":null,"type":"string","structure":{}},{"id":"92cd6110-d90f-11ed-a57c-89623b3170d1","value":null,"type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"maxitemcount","value":"","type":"string","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"cache","value":"0","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-278,"y":1476.812255859375,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"76df5d40-eb0e-11ec-85e6-6fa92818449e","endpoint_role":"list"},{"id":"AA19C3C2-0225-4FBD-A963-AA76C527D39F","type":"ShowBlock","disabled":false,"name":"output","displayName":"Output","comment":"","childId":"B5381520-C688-4331-944C-ACEB4991E600","inputs":[{"id":"input","value":"{$.listGroups}","type":"string","structure":{}}],"settings":[{"id":"display_mode","value":"add","type":"select","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":0,"y":1960},{"id":"B5381520-C688-4331-944C-ACEB4991E600","type":"ShowBlock","disabled":false,"name":"output2","displayName":"Output 2","comment":"","childId":null,"inputs":[{"id":"input","value":"{ $.listSpaces }","type":"string","structure":{}}],"settings":[{"id":"display_mode","value":"add","type":"select","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":852,"y":1684},{"id":"5991268A-2488-452A-90C0-DC2FA61ADC31","type":"EndpointBlock","disabled":false,"name":"updateAutoCreateGroupSetting","displayName":"Qlik Platform Operations - Update Auto Create Group Settings","comment":"","childId":"2B645B4D-3EDF-442F-9BE9-5FB1DE02086D","inputs":[{"id":"61694ab0-fba7-11ec-b3f2-bb1ea3438eb6","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"d46eda20-fba7-11ec-b2b5-6151e2772644","value":"true","type":"select","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-318,"y":318,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"61368c80-fba7-11ec-9317-af2068a3d3f2","endpoint_role":"update"},{"id":"0DB7ADA2-C800-4758-9A0E-CA85D4599C81","type":"EndpointBlock","disabled":false,"name":"addMemberToSpace2","displayName":"Qlik Platform Operations - Add Member To Space 2","comment":"","childId":"E5CC3A9C-360F-418F-BC53-255E96CCB813","inputs":[{"id":"2bbdd560-23a2-11ed-998f-858ca361c79f","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"2ba4a130-23a2-11ed-9472-e7f47c82203b","value":"{$.createSpace2.id}","type":"string","structure":{}},{"id":"2bb4fbb0-23a2-11ed-b297-0165721c1b96","value":"{$.filterList[0].id}","type":"string","structure":{}},{"id":"8c8f4fd0-23a2-11ed-ada7-b5bcc6e7e0b4","value":"[\"consumer\", \"contributor\", \"dataconsumer\", \"facilitator\", \"publisher\"]","type":"string","structure":{}},{"id":"2bacb5f0-23a2-11ed-846d-bb4022e4aa33","value":"2bb40360-23a2-11ed-9595-55706cb7bee7","type":"select","displayValue":"group","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":404,"y":1259,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"2b916d90-23a2-11ed-91e7-1156a32207d1","endpoint_role":"create"},{"id":"A125BBF4-3740-4772-A401-7C96F5736ED4","type":"EndpointBlock","disabled":false,"name":"addMemberToSpace3","displayName":"Qlik Platform Operations - Add Member To Space 3","comment":"","childId":"86EE213F-44E5-4478-8CF3-A0F4BFA4DB45","inputs":[{"id":"2bbdd560-23a2-11ed-998f-858ca361c79f","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"2ba4a130-23a2-11ed-9472-e7f47c82203b","value":"{$.createSpace.id}","type":"string","structure":{}},{"id":"2bb4fbb0-23a2-11ed-b297-0165721c1b96","value":"{$.filterList[0].id}","type":"string","structure":{}},{"id":"8c8f4fd0-23a2-11ed-ada7-b5bcc6e7e0b4","value":"[ \"codeveloper\", \"consumer\", \"dataconsumer\", \"facilitator\", \"producer\" ]","type":"string","structure":{}},{"id":"2bacb5f0-23a2-11ed-846d-bb4022e4aa33","value":"2bb40360-23a2-11ed-9595-55706cb7bee7","type":"select","displayValue":"group","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":0,"y":1160,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"2b916d90-23a2-11ed-91e7-1156a32207d1","endpoint_role":"create"}],"variables":[]}

Next steps

Now that you are have configured your tenant, move on to Deploy Qlik Sense applications.

Was this page helpful?