Error Moving API Management Service Due to Hidden Diagnostic Settings

Marco Muratori 0 Reputation points
2025-04-30T13:12:30.2633333+00:00

A subscription contains multiple resources, including three different API Management Services, which need to be moved to a different CSP subscription. Two of the API Management Services (developer tier) were moved successfully, but the last one (basic tier) raises the following error during validation:

The following resources cannot be moved because they have Azure Monitor diagnosticSettings set up [...] Remove diagnosticSettings first and retry

Despite checking both the Portal and CLI for any assigned Diagnostic Settings, none were found.

Is there a way to identify any hidden diagnostic settings that might not be visible in the Portal or CLI? How can this issue be resolved without recreating the resource?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,385 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ranashekar Guda 1,360 Reputation points Microsoft External Staff
    2025-04-30T14:54:02.3666667+00:00

    Hello @Marco Muratori,
    To resolve the issue with moving your API Management Service, it is important to ensure that all diagnostic settings are removed before attempting the move. If you are unable to find any assigned diagnostic settings through the Azure Portal or CLI, it is possible that there are hidden diagnostic settings that are not immediately visible.

    One approach to identify any hidden diagnostic settings is to check for any delete locks that may be applied to the resource or resource group. These locks can prevent the cleanup of diagnostic settings, which may lead to the error you are experiencing. You can remove the delete lock if it exists, and then attempt to remove the diagnostic settings again.

    If the issue persists, you may need to investigate further by using Azure Resource Manager (ARM) templates or PowerShell scripts to list all diagnostic settings associated with the resource. This can help uncover any settings that are not visible through the standard interfaces.

    I hope this helps resolve your issue. Feel free to reach out if you have further concerns.


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.