LM10
LM10

Reputation: 1199

Deleting Azure App Registration from Linux Terminal

I wanted to know if there is a way to delete Azure App Registrations from the Linux Terminal? I couldn't find the command for it in the azure documentation

Upvotes: 1

Views: 628

Answers (1)

Marilee Turscak - MSFT
Marilee Turscak - MSFT

Reputation: 7728

You can install both Azure Powershell and the Azure CLI on Linux. https://learn.microsoft.com/bs-latn-ba/powershell/azure/azurerm/install-azurermps-maclinux?view=azurermps-4.4.1 https://learn.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest

To delete the app registrations:

1.Run the Login-AzureRMAccount command and log in again using your global admin account. 2. Enter Get-AzureRmADApplication to get a list of all App Registrations. 3. Run Remove-AzureRmADApplication -objectid <ObjectId from above> for each App Registration found in your Azure Active Directory, making sure you enter “Y” to confirm that you want to delete it.

You can also use the script below to find and delete all App Registrations in one shot:

$ObjectIds = (Get-AzureRmADApplication).ObjectId
For ($i=0; $i -lt $ObjectIds.Length; $i++)
{
            Remove-AzureRmADApplication -objectid $ObjectIds[$i]
}

Upvotes: 1

Related Questions