0

I assigned a system assigned managedidentity to a containerApp through the Azure Portal. It has the role of AzrPull set at both the subscription level and registry level.

I try to remove the managedidentity through CLI

az containerapp identity remove \
  --name sysident \
  --resource-group myrg \
  --system-assigned \

getting this error:

(InvalidParameterValueInContainerTemplate) The following field(s) are either invalid or missing. Field 'configuration.Registries.myregistry.azurecr.io.Identity' is invalid with details: 'Invalid value: "system": Managed Identity does not exist';.

Removing it through portal also gives the same error shown above.

How to resolve this? Thanks

Coder
  • 39
  • 6

1 Answers1

-1
(InvalidParameterValueInContainerTemplate) The following field(s) are either invalid or missing. Field 'configuration.Registries.myregistry.azurecr.io.Identity' is invalid with details: 'Invalid value: "system": Managed Identity does not exist';.

The error message you are seeing indicates that the managed identity you are trying to remove does not exist.

To check if the System Managed identity exists in container apps, you can use the following Azure CLI command.

az containerapp identity show --name helloworld  --resource-group Compute-Resources

enter image description here

If the identity exists in container apps, you will see the output as below.

If the managed identity does not exist, you can ignore the error message. If the managed identity does exist, you can try removing it again using below Azure CLI command.

az containerapp identity remove --name helloworld --resource-group Compute-Resources --system-assigned

enter image description here

Venkat V
  • 2,197
  • 1
  • 1
  • 10