Share via

Cannot delete log analytics workspace

Anki Mäntykivi 20 Reputation points
2026-06-08T11:35:27.03+00:00

I tried to delete a log analytics workspace from Azure Portal and from Power Shell, but neither works.
From portal I get error:
Batch response item http error 409

Error details

managed-amiInworksFunctions-ws: <PII Removed>

From PS

Operation returned as invalid status code "Not found"

So I want to delete both log analytics workspace and the resource group. What can I do?

Azure Monitor
Azure Monitor

An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.

0 comments No comments

Answer accepted by question author

Edwin Cupido 80 Reputation points
2026-06-08T12:39:00.13+00:00

Good day @Anki Mäntykivi

It is most likely one of these:

  • Application Insights resource (workspace-based)
  • Azure Function App / App Service using that Application Insights
  • ARM/Bicep deployment that created a “managed” monitoring setup

Steps:

  • Go to Application Insights (linked to that workspace)
  • Delete the Application Insights resource
  • Wait (Azure cleanup can take a few minutes)
  • The deny assignment will be removed automatically
  • Then delete:
    • Resource group OR
    • Workspace (if still present)

If you don't need anything inside the resource group:

Delete the main resource group that contains the Function/App Insights NOT the _managed one.

Azure will:

  • Remove dependent resources
  • Then remove the managed RG automatically

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anki Mäntykivi 20 Reputation points
    2026-06-08T13:30:59.2066667+00:00

    Thanks for your advice. I managed to delete the workspace now.

    Was this answer helpful?


Your answer

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