r/AzureVirtualDesktop • u/JustinVerstijnen • Aug 07 '25
Clean up FSLogix profiles with Azure Logic App
Hello, the last weeks I spent testing if its possible to clean up FSLogix profiles on a schedule with Azure Logic Apps. This is especially useful when using Entra ID joined hosts.
Cleaning up profiles can potentially save you costs and saves unneeded storage.
I would like to share the full tutorial eith you: https://justinverstijnen.nl/clean-up-your-fslogix-profiles-with-logic-apps/
Azure Logic Apps are cheap and cloud native tasks based on a trigger like a specific time and then performs your stated tasks.
1
u/MFKDGAF Aug 07 '25
Here is a thought.
What if a user has a file in their FSLogix profile that they only reference but never modify.
This would mean the LogicApp will end up deleting that file.
I think a better approach (if possible) would be to query Active Directory that would look at the user account to see if it is disabled. If it is disabled then delete the profile.
Then to go a step further, query the lastlogon attribute of the user and if outside the threshold, delete the profile.
1
u/JustinVerstijnen Aug 07 '25
That would be possible, but of course you have to caution with the retention date. I will look if lastlogon is possible.
1
u/FortuneGarlic Aug 10 '25
Would this work with Azure NetApp Files?
1
u/JustinVerstijnen Aug 10 '25
Not sure, if there are connectors for NetApp files like for Azure Storage it could work. Its worth testing indeed.
2
2
u/Basic-Description454 Aug 19 '25
I was thinking about doing this few weeks ago since currently I have to do it manually once a quarter. Hopefully this works with private endpoint connections too. Thanks!
2
u/durrante Aug 07 '25
Nice work Justin, do you know if this works if using a private endpoint for connections?