Created
April 12, 2026 10:15
-
-
Save codingfreak/d816fc9deff8a304dc28f22fa93f633c to your computer and use it in GitHub Desktop.
Permanently delete all deleted Entra ID appregistrations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Connect-MgGraph -Scopes "Application.ReadWrite.All" | |
| Get-MgDirectoryDeletedItemAsApplication -All | ` | |
| ForEach-Object { Remove-MgDirectoryDeletedItem -DirectoryObjectId $_.Id } | |
| # If you want to delete just one with a specific name | |
| Get-MgDirectoryDeletedItemAsApplication -All | ` | |
| ∙ Where-Object { $_.DisplayName -eq "YOUR_APP_NAME" } | ` | |
| ∙ ForEach-Object { Remove-MgDirectoryDeletedItem -DirectoryObjectId $_.Id } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment