modern-data-warehouse-dataops
modern-data-warehouse-dataops copied to clipboard
[BUG] spns should be removed by clean-up script
Description
- The current clean-up script does not remove all SPNs. In particular SPNs created for ADF and storage are not deleted. The problem seems to be that the app registration is created without owner.
- potentially, when clean-up is executed with Deployment ID, we should remove the "owned by you" filter and just filter for name.
Expected Behavior
- All SPNs, specifically those with prefix
mdwdops-storandmdwdops-adfSPNs, should be deleted.
Reproduce
- Deploy once
- execute clean-up
- after clean-up completes the spns will still be in Entra see screenshot:
Additional Context
Here's what I used to clean up the "soft deleted" accounts:
Get-AzureADDeletedApplication -all 1 | ForEach-Object { Remove-AzureADdeletedApplication -ObjectId $_.ObjectId }