Hi ,
Thanks for reaching out to Microsoft Q&A.
The error you’re encountering indicates that the AI Search Service (gptkb-xp2warnlhe5i6
) cannot be deleted because it’s attempting to validate or check management locks on an associated Storage Account (stxp2warnlhe5i6
) that has already been deleted. This is a known conflict that can occur when a dependent resource (in this case, the Storage Account) is deleted, yet the AI Search Service retains references to it.
Here’s a step-by-step approach to resolve this issue:
- Verify in Resource Explorer:
- Go to Azure Resource Explorer to confirm that no remnants of the deleted Storage Account exist in the resource hierarchy.
- In Resource Explorer, navigate to the search service (
Microsoft.Search/searchServices
) within your subscription and ensure there are no lock references related to the deleted Storage Account.
- In Resource Explorer, navigate to the search service (
- Force Deletion using Azure CLI:
- Sometimes, manually running a delete command via CLI can bypass certain validation errors.
- Run the following command in the Azure CLI:
az search service delete --name gptkb-xp2warnlhe5i6 --resource-group rg-rag-0613 --yes
- If the service has a Soft Delete enabled, you may need to purge it by running az search service purge --name gptkb-xp2warnlhe5i6 --resource-group rg-rag-0613
- Run the following command in the Azure CLI:
- Check for Managed Identity Resources:
- In some cases, the resource may still hold a Managed Identity or Key Vault reference that needs to be unlinked. Check under Azure Active Directory > Enterprise Applications and remove any related identities or permissions associated with
gptkb-xp2warnlhe5i6
. - This approach should help bypass the lock validation check that’s causing the conflict. Let me know if you encounter any additional errors during these steps.
- In some cases, the resource may still hold a Managed Identity or Key Vault reference that needs to be unlinked. Check under Azure Active Directory > Enterprise Applications and remove any related identities or permissions associated with
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.