A unified data governance solution that helps manage, protect, and discover data across your organization
Hi Francesco Castellani
Thank you for reaching out to Microsoft Q&A!, regarding the custom classification deletion issue in Microsoft Purview. The "has references" error despite showing "0 instances" typically indicates hidden dependencies such as classification rules, typedef references, or internal metadata links that must be cleaned up first.
Step-by-Step Resolution
- Remove Applied Classifications from Assets
Even if UI shows 0, verify and clear any lingering tags using GET https://{catalog}.purview.azure.com/datamap/api/atlas/v2/search/basic?typeName=*&query=Application_documents_UAT. If results appear, use bulk classification removal via POST https://{catalog}.purview.azure.com/datamap/api/atlas/v2/entity/bulk/classification with body {"entities": [{"typeName": "asset_type", "guid": "entity_guid"}], "classificationNames": ["Application_documents_UAT"]}.
- Delete Classification Rules:
Navigate to Data Map > Classification rules > Custom tab in Purview Studio, filter for rules referencing Application_documents_UAT, select, and delete. API alternative: GET https://{catalog}.purview.azure.com/datamap/api/atlas/v2/entity/type/ClassificationRule then DELETE /atlas/v2/entity/guid/{rule-guid} for matches.
- Inspect and Delete Typedef:
Check dependencies with GET https://{catalog}.purview.azure.com/datamap/api/atlas/v2/types/typedef/name/Application_documents_UAT. Once clean, delete using DELETE https://{catalog}.purview.azure.com/datamap/api/atlas/v2/types/typedefs with body {"classificationDefs": [{"name": "Application_documents_UAT"}], "enumDefs": [], "structDefs": [], "entityDefs": [], "relationshipDefs": []}.
If Deletion Still Fails
The 409 error may require backend cleanup of internal references. Please collect full API response/error details, share your Purview account name and classification GUID, and open a support ticket via Azure Portal > Purview > New support request.
Key References:
Custom classifications management Purview Data Plane Type APIs Atlas 2.2 typedef operations
Let us know your results or if you need assistance with API authentication.