Unable to unlink and delete Automation Account

Brian Jean 0 Reputation points
2025-04-21T15:08:47.1566667+00:00

I am trying to delete my azure automation account. First, I try to unlink the log analytics workspace which completes successfully. When I navigate away from the linked resources subpage in the automation account and then go back, the linked workspace is still there even though i have received a confirmation notification from azure that the workspace was successfully unlinked. I've tried doing this though the gui as well as powershell commands in azure cloud shell.

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,353 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vinod Pittala 1,750 Reputation points Microsoft External Staff Moderator
    2025-04-23T08:44:05.12+00:00

    Hello Brian Jean,

    Could you please confirm if the dependencies are already removed?

    Additionally, once the dependencies are clear, please try to run the below command to understand the current status of the unlinking process.

    az monitor log-analytics workspace linked-service show -g MyResourceGroup -n automation --workspace-name MyWorkspace
    

    Please make sure to replace MyResourceGroup with the resource group of the workspace, and MyWorkspace with the actual workspace name. The rest of the command remains unchanged.

    below doc is for the reference:

    https://learn.microsoft.com/en-us/cli/azure/monitor/log-analytics/workspace/linked-service?view=azure-cli-latest#az-monitor-log-analytics-workspace-linked-service-show-examples

    If you receive a response and the provisioningState shows Succeeded, it means the unlinking is still being processed in the backend.

    If no response is returned, it indicates the unlinking has been completed, and the status will update in the Azure portal within approximately 48 hours.

    Note: We are aware of this issue. The MS engineering team confirmed that it takes a day or two, but eventually the account gets deleted.


    If the provided solution works for your query, please do not forget to click Upvote Button. this can be beneficial to other community members.it would be greatly appreciated and helpful to others

    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.