An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Hello Chi-Ling Hsiao
Thank you for posting your query on Microsoft Q&A platform.
Deleting resources related to managed workspaces
- Deleting an Application Insights resource linked to a managed Log Analytics workspace will delete everything; the Application Insights component, managed Log Analytics Workspace and the managed resource group.
It is NOT possible to delete either the managed Log Analytics workspace OR the managed resource group while an Application Insights Component is still linked to the managed the workspace
If there is NO Application Insight component linked to the managed workspace then delete the managed resource group and it will delete the managed Log Analytics workspace too It is NOT possible to delete just the managed Log Analytics workspace Application Insights managed workspaces - Azure Monitor | Microsoft Learn NOTE: It is common practice to keep the managed resource for the duration of what the retention period is for the Application Insights data thus not losing that telemetry prematurely
So, Remove a managed workspace only after it isn't connected to an Application Insights resource. Use one of the following options.
Option 1: Delete the Application Insights resource
Delete the Application Insights resource that owns the managed workspace. Azure deletes the managed resource group and the workspace automatically.
Option 2: Keep the Application Insights resource
Reconnect the Application Insights resource to a different Log Analytics workspace. Delete the managed resource group that contains the managed workspace.
As Application Insights is already re‑linked, the only supported way to delete the managed Log Analytics workspace is by deleting its managed resource group.
Delete the managed resource group (not the workspace) as this is the only supported action after re‑linking:
Delete the managed resource group that was created for Application Insights. Deleting the managed resource group will remove:
the managed Log Analytics workspace the deny assignment any remaining managed resources
This is the designed cleanup mechanism.
Please try this and let me know if it is helpfull or not and refer the below document:
Application Insights managed workspaces - Azure Monitor | Microsoft Learn
Thanks,
Suchitra.