my resource lock on my VM wont stay on "delete". it keeps going back to "read-only"

Ahmed Idris 0 Reputation points
2023-06-07T21:17:52.13+00:00

my resource lock on my VM wont stay on "delete". it keeps going back to "read-only"

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,041 questions
Azure Resource Mover
Azure Resource Mover
An Azure service used for moving multiple resources between Azure regions.
288 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 20,777 Reputation points Microsoft Employee Moderator
    2023-06-08T02:07:34.8233333+00:00

    @Ahmed Idris Thanks for posting your query on Microsoft Q&A.

    To create or delete management locks, you need access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Only the Owner and the User Access Administrator built-in roles can create and delete management locks. You can create a custom role with the required permissions.

    • Can you please confirm/ensure that you have the right permissions/role and then try again?
    • How did you try to configure lock on your resource/VM, via Azure Portal, CLI, PowerShell, template? Let me know.

    Try applying the lock on the resource by following the steps in this document. For example, follow this to achieve this via Azure Portal: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources?tabs=json#portal

    • Please share screenshots of the configured lock on Azure Portal.

    Let me know the results after trying the suggested steps and I can investigate further. Thanks.

    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.