The scope cannot perform delete operation because following scope(s) are locked: Please remove the lock and try again.

Manoj Kumar 0 Reputation points
2023-10-15T09:49:41.2233333+00:00

The scope cannot perform delete operation because following scope(s) are locked: Please remove the lock and try again.

Above error is coming while trying to deploy ADF using CICD.

Below step executed and start getting the above error:

  1. Created the storage event trigger using the Azure subscription in ADF
  2. Deployed/Publish on DEV
  3. Tested storage event trigger and working fine on DEV
  4. Tried to deploy on QA but getting error
  5. Then deleted pipeline that was using the storage event trigger
  6. Deleted the storage event trigger
  7. Tried to publish ADF on DEV but getting error
  8. Then deleted event subscription from Dev Storage Account
  9. Trying to publish on DEV but now getting above error
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,199 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 85,746 Reputation points Microsoft Employee
    2023-10-19T05:11:49.27+00:00

    @Manoj Kumar - Thanks for the question and using MS Q&A platform.

    It seems like the error message is related to a lock on the scope. This error can occur when a resource is locked by another operation. You need to remove the lock and try again.

    To remove the lock, you can follow these steps:

    1. Go to the Azure portal and navigate to the resource group that contains the locked resource.
    2. Click on the locked resource to open its details page.
    3. Click on the "Locks" option in the left-hand menu.
    4. Select the lock that is causing the issue and click on the "Delete" button.
    5. Confirm the deletion of the lock.

    User's image

    After removing the lock, you can try to deploy ADF using CICD again. If you still face the same issue, please provide more information about the error message or any other error messages that you receive.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments