Last active
November 24, 2023 09:44
-
-
Save garrytrinder/6982a3e75bcba628ee0ea9abdae5ee55 to your computer and use it in GitHub Desktop.
Remove Azure AD app registrations
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
# assumes you are logged into tenant using CLI for Microsoft 365 (https://aka.ms/cli-m365) | |
$notToRemove = @("app1","app2") | |
$apps = m365 aad app list | ConvertFrom-JSON | |
$apps | Where-Object { $_.displayName -notin $notToRemove } | ForEach-Object { m365 aad app remove --appId $_.appId --force } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replaced
--confirm
with--force
due to v7 breaking change