
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Qlik Cloud: Delete license allocation with Qlik-CLI
Nov 15, 2023 8:13:25 AM
Apr 4, 2023 5:39:18 AM
Assigned Qlik Cloud licenses and entitlements can be deallocated using the Qlik Command Line Interface. This method is specifically useful when the user with the allocated entitlement or license is no longer visible in the system and can therefore not be configured in the Management Console.
Resolution
- Download and configure the Qlik-cli
- Open PowerShell or UNIX shell
- Run qlik license assignment ls to obtain a list of currently assigned licenses:
[ { "created": "2023-04-03T11:24:05.101Z", "excess": false, "name": “Enzo Bearzot”, "subject": "auth0|12345678”, "type": "professional", "userId": “userid1” }, { "created": "2022-08-17T11:50:04.647Z", "excess": false, "name": “Vittorio Pozzo”, "subject": "auth0|910111213”, "type": “analyzer”, "userId": “userid2” }, { "created": "2022-08-17T11:50:04.647Z", "excess": false, "name": “Ferruccio Valcareggi”, "subject": "auth0|14151617”, "type": "professional", "userId": “userid3” }, { "created": "2022-06-07T11:36:15.704Z", "excess": false, "subject": “18192021”, "type": “professional” }, { "created": "2022-06-03T13:50:14.105Z", "excess": false, "subject": “22232425”, "type": "analyzer" }, ]
- Identify any user whose license you want to remove.
There is a higher probability that you'll find them among the users who have no "name:" and "userid:" fields. - Construct the following string for each user:
The syntax below is for Unix shells. For usage in Windows Powershell add a "backslash" before each "doublequote" sign. '[{"subject"... will have to become '[{\"subject\"...
'[{"subject":"USERSUBJECT","type":"ASSIGNEDLICENSE"}]'
Example: Using the last user in the list provided above, the string would be:
'[{"subject":"22232425","type":"analyzer"}]' -
Feed the string into this command:
.\qlik.exe license assignment delete --delete STRING
With the example above you will run:
Example using the last user in the list above:.\qlik.exe license assignment delete --delete '[{"subject":"22232425","type":"analyzer"}]'
-
Run the command and wait for the result.
A status returned as 200 will confirm the removal worked:% qlik license assignment delete --delete '[{"subject":"22232425","type":"analyzer"}]' [ { "status": 200, "subject": "22232425", "type": "analyzer" } ]
-
Verify the allocation was removed by navigating to the Qlik Cloud Management Console's Home section.
Related Content
Environment

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
is there a way to do this in the CONSOLE for a single user?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Ken_T , if the user is visible, which is in the almost-entirety of cases, then it is possible.
There are some scenarios where the user is hidden, or was deleted, then the problem can be solved via the API calls. The qlik-cli is a easier-to-use interface for the API calls, and it allows to do more than what you can do on the console.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
this sounds like a dumb question, but to remove a persons license in the console (without causing any issues or orphaned records should they come back to log in later) - is that done by using the "disable" option for the user? What would be the proper steps to manually, in the console, to remove a users license? to prevent any future issue should they log in later.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Ken_T , that is done via the "Removing user entitlement" instructions that you can find here: https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Admin/SaaS-user-allocati...

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
thanks --we will test that to make sure it works, then work on doing the CLI script to do this. Removing the entitlement for the user, should free up the license, and then if the user comes back in the future, if dynamic assignment of entitlements (license) is on - they should get a new one, and all their old content, apps, connections etc should still be there for them. right?
I heard that there may be a new block coming to automation to help with doing this in SAAS/QCG, in the future. Platform Operations block... Can you confirm this is coming soon?


- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Windows PowerShell required escaping of double quotes and \ symbols.
It may depend on the environment,I hope this helps someone who has encountered the same problem.
Example
qlik license assignment delete --delete '[{\"subject\":\"domain\\user1\",\"type\":\"analyzer\"}]'