how to delete azure container apps revisions

Shavarsh Shahoyan 0 Reputation points
2023-08-03T19:50:30.37+00:00

deny assignment

error message deny assignment

I

I have a container app in Container Apps Environments, when trying to perform any action like deactivating revisions I am getting a weird message provided below
The client 'live.com#admin@wordbook.pro' with object id '3e4e4621-0c08-41dc-9bd1-d64d3e92a943' has permission to perform action 'Microsoft.App/containerApps/write' on scope '/subscriptions/350c427a-6dcc-4ea7-bcb9-424b98cb1c50/resourceGroups/wordbook6222023_SpringApps_023206ab-685b-445e-8b0a-b1aef9c398a2/providers/Microsoft.App/containerApps/wordbookv2'; however, the access is denied because of the deny assignment with name '747dbb46-4acb-4292-a884-e37d9c56eea4' and Id '747dbb464acb4292a884e37d9c56eea4' at scope '/subscriptions/350c427a-6dcc-4ea7-bcb9-424b98cb1c50/resourceGroups/wordbook6222023_SpringApps_023206ab-685b-445e-8b0a-b1aef9c398a2'.

when I go to the concrete container app access control(IAM) tab I see the deny assignment but I am unable to delete it and it is inherited from a resource group. One more thing - when I click on deny assignment name it opens a new window and shows the message saying that that deny assignment are currently read only

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
419 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 24,270 Reputation points Microsoft Employee
    2023-08-04T03:11:03.6+00:00

    @Shavarsh Shahoyan Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    I understand that you are encountering the permissions issue due to the deny assignments while trying to perform action like deleting/deactivating revisions in Azure Container Apps.

    Regarding the below error related to the deny assignment:

    The client 'live.com#admin@wordbook.pro' with object id '3e4e4621-0c08-41dc-9bd1-d64d3e92a943' has permission to perform action 'Microsoft.App/containerApps/write' on scope '/subscriptions/350c427a-6dcc-4ea7-bcb9-424b98cb1c50/resourceGroups/wordbook6222023_SpringApps_023206ab-685b-445e-8b0a-b1aef9c398a2/providers/Microsoft.App/containerApps/wordbookv2'; however, the access is denied because of the deny assignment with name '747dbb46-4acb-4292-a884-e37d9c56eea4' and Id '747dbb464acb4292a884e37d9c56eea4' at scope '/subscriptions/350c427a-6dcc-4ea7-bcb9-424b98cb1c50/resourceGroups/wordbook6222023_SpringApps_023206ab-685b-445e-8b0a-b1aef9c398a2'.

    Please check if you have the necessary permissions to delete the deny assignment. You need to have the Owner or User Access Administrator role to delete a deny assignment. If you don't have these RBAC permissions you can check with the subscription owners if they can assist you in removing this assisgnment.

    Once the deny assignment is removed, You can Activate / deactivate the unused or outdated revisions using the Azure Portal or Azure CLI or REST API.

    Here is an example of deactivating the Azure Container Apps Revisions using Azure CLI:

    az containerapp revision deactivate \
      --revision <REVISION_NAME> \
      --resource-group <RESOURCE_GROUP_NAME>
    

    Alternatively, If you want to start/stop the conatiner apps you can do it through CLI:

    az rest -m POST -u "/subscriptions/$SUBSCRIPTION/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/containerapps/$APP_NAME/start?api-version=2023-04-01-preview"
    
    az rest -m POST -u "/subscriptions/$SUBSCRIPTION/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/containerapps/$APP_NAME/stop?api-version=2023-04-01-preview"
    

    Refer some of the useful articles if that helps: https://github.com/microsoft/azure-container-apps/issues/664 https://video2.skills-academy.com/en-us/azure/container-apps/revisions-manage?tabs=bash https://stackoverflow.com/questions/74386606/how-to-delete-a-revision-in-azure-container-apps

    Hope this helps.

    **
    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.