I need to remove a Site Extension across ~50 Azure App Services.
The az webapp command space doesn’t list anything for Site Extensions: https://learn.microsoft.com/en-us/cli/azure/webapp?view=azure-cli-latest
The Azure team won’t touch Site Extensions: https://github.com/Azure/azure-cli/issues/7617
However, a comment shows it’s possible to delete the extension, if you know the resource ID: https://github.com/Azure/azure-cli/issues/7617#issuecomment-952743871
This command does not return installed extensions:
az resource list --resource-type Microsoft.Web/sites
And this command returns nothing:
az resource list --resource-type Microsoft.Web/sites/siteextensions
So how can I get a list of installed webapp extensions with Azure CLI?
2
Answers
Even Iam unable to get the Extensions list with
az resource list --resource-type Microsoft.Web/sites
command.Instead of
az resource list
use showaz resource show
.I have tried to run the command in loop using
Bash
.Output:
The webapps which has extensions installed will be listed.
You can use WebApps -List Site Extensions REST API to pull the list of extensions installed in the specific webapp.
You Need to write a custom script using the above rest API in PowerShell.
Here is the sample script and please do modify it accordingly based on your requirement.