Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikToFindOut
Creator
Creator

How to delete apps that belong to inactive users

Hello,

We have a lot of users that have created apps in the environment that take up an enormous amount of space that are also users that are inactive. Is there an easy to find out which apps in the Sense environment belong to users that are Inactive? I would very much like to delete those apps, but don't see an easy avenue to achieve that.

Thanks in advance.

Labels (1)
  • Other

3 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hi,

I dont think there is any way other than identifying inactive users (Users section in QMC) and deleting apps from QMC manually.

Let everyone know if you find any way to do this. 🙂

 

Thanks,

Ashutosh.

Levi_Turner
Employee
Employee

Hey there,

Doing this level of automation would require interaction with the Qlik Sense Repository API. For simplicity, I generally recommend the Qlik-Cli-Windows PowerShell module. For this use-case, this script would accomplish your goal.

WARNING: This delete is not reversible. Personally, I'd back-up the apps first before doing any delete option.

Get-QlikUser -full -filter "inactive eq true" | % {
	Get-QlikApp -full -filter "owner.id eq $($_.id)" | Remove-QlikApp
	}

 

Option with exporting:

Get-QlikUser -full -filter "inactive eq true" | % {
	$apps = Get-QlikApp -full -filter "owner.id eq $($_.id)"
    $apps | % {
        Export-QlikApp -id $($_.id) -filename "$($_.name).qvf"
        Remove-QlikApp -id $($_.id)
        }
	}

 

QlikToFindOut
Creator
Creator
Author

Thanks for the suggestion. Though this is quite dangerous and I think I will avoid doing something like this.

Appreciate it!