Created
November 20, 2024 10:22
-
-
Save waldekmastykarz/62f20994ada618c900a8eb85294700bd to your computer and use it in GitHub Desktop.
Delete old Microsoft Entra 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
# Remove Microsoft Entra app registrations created before Jan 1, 2024 | |
# Requires CLI for Microsoft 365 and jq | |
m365 entra app list -o json --query "[?createdDateTime < '2024-01-01T00:00:00Z'].appId" | jq -r '.[]' | while read -r line; do | |
echo "Removing $line..." | |
m365 entra app remove --appId "$line" --force | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment