<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Delete multiple users in Management &amp; Governance</title>
    <link>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528807#M32167</link>
    <description>&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;The reason behind my question is that I am testing the migration of users to the cloud using the migration tool. That's why I want to delete all users except the admins.&lt;BR /&gt;I'm not yet particularly familiar with the API, and I think the quickest and easiest way would be to select users and delete them with a single click, as you can do with apps or data connections.&lt;BR /&gt;But this option is obviously not available.&lt;BR /&gt;Or can it be configured?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Thomas&lt;/P&gt;</description>
    <pubDate>Fri, 29 Aug 2025 08:38:46 GMT</pubDate>
    <dc:creator>Thomas23</dc:creator>
    <dc:date>2025-08-29T08:38:46Z</dc:date>
    <item>
      <title>Delete multiple users</title>
      <link>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528794#M32165</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to delete multiple users from Qlik Cloud Analytics.&lt;/P&gt;&lt;P&gt;There are check boxes left of the user names and I can select the users but there is no delete button or something similar.&lt;/P&gt;&lt;P&gt;I only can delete a single user by clicking the three dots at the right and then select "Delete user" in the menu.&lt;BR /&gt;&lt;BR /&gt;Is there a way to delete multiple users?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2025 07:07:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528794#M32165</guid>
      <dc:creator>Thomas23</dc:creator>
      <dc:date>2025-08-29T07:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple users</title>
      <link>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528801#M32166</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/142300"&gt;@Thomas23&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on the number of users and how frequently you need to delete in bulk, you might want to explore the APIs available in Sense to carry this out.&lt;/P&gt;&lt;P&gt;This code snippet shows looping around a number of users in a load script and deleting each of them:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// Loop for each of these licences and delete them
for iOrphan = 0 to NoOfRows('Licences') -1
	let vSubject = replace(peek('Subject', iOrphan, 'Licences'), '\', '\\');
    
    // Connect to the POST connection
    LIB CONNECT TO 'Data:GenericPOST';

    let vURL = 'https://$(vInstance)/api/v1/licenses/assignments/actions/delete';
    
    TRACE ***** Removing user $(vSubject);
    
    Deleted:
    SQL SELECT 
        "type",
        "subject",
        "status",
        "code",
        "title"
    FROM JSON (wrap off) "data"
    WITH CONNECTION (
      URL "$(vURL)",
      HTTPHEADER "Authorization" "Bearer $(vAPIKey)",
      BODY "{""delete"":[{""type"":""analyzer"",""subject"":""$(vSubject)""}]}"
    )
    ;
next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The pull of what all the user subjects are can come from the API also.&lt;/P&gt;&lt;P&gt;You might find this article useful:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Delete-Qlik-Cloud-licenses-using-the-REST-connector/ta-p/1993162" target="_blank"&gt;https://community.qlik.com/t5/Official-Support-Articles/Delete-Qlik-Cloud-licenses-using-the-REST-connector/ta-p/1993162&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2025 08:12:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528801#M32166</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2025-08-29T08:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple users</title>
      <link>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528807#M32167</link>
      <description>&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;The reason behind my question is that I am testing the migration of users to the cloud using the migration tool. That's why I want to delete all users except the admins.&lt;BR /&gt;I'm not yet particularly familiar with the API, and I think the quickest and easiest way would be to select users and delete them with a single click, as you can do with apps or data connections.&lt;BR /&gt;But this option is obviously not available.&lt;BR /&gt;Or can it be configured?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Thomas&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2025 08:38:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528807#M32167</guid>
      <dc:creator>Thomas23</dc:creator>
      <dc:date>2025-08-29T08:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple users</title>
      <link>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528834#M32168</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/142300"&gt;@Thomas23&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your use case is a bit different to mine (clearing redundant licences when the user has been removed from the directory), but this part of the code may be useful also. This lists all users from the API:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// Get a list of the current users
let vURL = 'https://$(vInstance)/api/v1/users?limit=100' ; //&amp;amp;status=invited%2Cactive%2Cdisabled%2Cdeleted';
let iPage = 0;

do while len(vURL) &amp;gt; 0 and iPage &amp;lt; iBackstop
	let iPage = iPage + 1;
    
    TRACE ***** Fetching User Page $(iPage);
    
    JSON:
    SQL SELECT 
        (SELECT 
            (SELECT 
                "href"
            FROM "next" FK "__FK_next")
        FROM "links" PK "__KEY_links" FK "__FK_links"),
        (SELECT 
            "id",
            "status",
            "subject",
            "email"
        FROM "data" PK "__KEY_data" FK "__FK_data")
    FROM JSON (wrap on) "root" PK "__KEY_root"
    WITH CONNECTION (
      URL "$(vURL)",
      HTTPHEADER "Authorization" "Bearer $(vAPIKey)"  
    )
    ;

    // Append raw data to temporary table
    tmpUsers:
    LOAD
        id,
        status,
        subject,
        email
    RESIDENT JSON
    WHERE NOT IsNull(id);

    tmpPage:
    LOAD href RESIDENT JSON WHERE NOT IsNull(href);
    
    DROP TABLE JSON;
    
    // Next page URL, will be blank if all data fetched
    let vURL = peek('href', -1, 'tmpPage');
    DROP TABLE tmpPage;
loop&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will want to put a where statement in there to remove the admins. I don't know how many you have, but just a where&amp;nbsp;&lt;STRONG&gt;match(email, 'joe.bloggs@acme.com', 'jane.doe@acme.com') = 0&amp;nbsp;&lt;/STRONG&gt;would do it if you have a finite list.&lt;/P&gt;&lt;P&gt;The API call I put before was removing the licence from a user, rather than deleting from the directory. This might help if you actually want to delete them from the directory:&lt;/P&gt;&lt;P&gt;&lt;A href="https://qlik.dev/apis/rest/users/#delete-api-v1-users-userId" target="_blank"&gt;https://qlik.dev/apis/rest/users/#delete-api-v1-users-userId&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hopefully you will piece something together from these fragments to achieve what you need to.&lt;/P&gt;&lt;P&gt;It kind of feels like something that others will have done if they are using the migration tool.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2025 10:53:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528834#M32168</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2025-08-29T10:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple users</title>
      <link>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528850#M32172</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/142300"&gt;@Thomas23&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I use the Qlik CLI for it.&lt;/P&gt;&lt;P&gt;It a simple command line that you'll need to run.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Install Chocolatey:&amp;nbsp;&lt;A href="https://chocolatey.org/" target="_blank"&gt;https://chocolatey.org/&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Install Qlik CLI: &lt;SPAN&gt;choco&lt;/SPAN&gt; &lt;SPAN&gt;install&lt;/SPAN&gt; &lt;SPAN&gt;qlik-cli&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Connect to your Qlik Cloud tenant: qlik context init&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;List the users:&amp;nbsp;qlik user ls&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;For each user you want to remove, run the remove command: qlik user rm &amp;lt;userId&amp;gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Let me know how it goes!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2025 13:43:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2528850#M32172</guid>
      <dc:creator>hugo_andrade</dc:creator>
      <dc:date>2025-08-29T13:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple users</title>
      <link>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2529018#M32182</link>
      <description>&lt;P&gt;Hello Hugo,&lt;BR /&gt;the CLI statement works, I can delete a user.&lt;/P&gt;&lt;P&gt;Is it possible to use a list of IDs as argument?&lt;/P&gt;&lt;P&gt;Regards&lt;BR /&gt;Thomas&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 06:46:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2529018#M32182</guid>
      <dc:creator>Thomas23</dc:creator>
      <dc:date>2025-09-01T06:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple users</title>
      <link>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2529106#M32186</link>
      <description>&lt;P&gt;Nice&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/142300"&gt;@Thomas23&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;I'm happy it helped.&lt;/P&gt;&lt;P&gt;You can only delete one user at a time with the command, but you can stack them to run in sequence.&lt;/P&gt;&lt;P&gt;You can use Excel to format the sequence of calls. Copy all of them and paste at once on Command Line.&lt;/P&gt;&lt;P&gt;Each line will execute the user removal, and automatically proceed to the next one.&lt;/P&gt;&lt;P&gt;See example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hugo_andrade_0-1756754155360.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/183296i4F02C38F767793D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hugo_andrade_0-1756754155360.png" alt="hugo_andrade_0-1756754155360.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then you copy the resulting column into Command Line and let it do its magic.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please like and mark as solved if this helps you.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 19:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2529106#M32186</guid>
      <dc:creator>hugo_andrade</dc:creator>
      <dc:date>2025-09-01T19:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple users</title>
      <link>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2529514#M32201</link>
      <description>&lt;P&gt;Hi Hugo,&lt;BR /&gt;&lt;BR /&gt;it works fine.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2025 13:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Delete-multiple-users/m-p/2529514#M32201</guid>
      <dc:creator>Thomas23</dc:creator>
      <dc:date>2025-09-04T13:06:00Z</dc:date>
    </item>
  </channel>
</rss>

