Qlik Community

Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
leonling
Contributor III
Contributor III

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
Partner

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)
        }
	}

 

leonling
Contributor III
Contributor III
Author

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

Appreciate it!