Share via

Purview REST API: classification has instance count of 0 but I cannot delete it

Francesco Castellani 100 Reputation points
2026-02-26T18:12:46.78+00:00

In the UI, I'm trying to delete a classification that has no assets associated with it.

User's image

But I cannot:

User's image

What are these references if they're not assets using this particular classification?

If I try to do this using Postman or the REST API, I get the following. How can I solve this?

409 Client Error: Conflict for url: https://<catalogue-name>.purview.azure.com/catalog/api/atlas/v2/types/typedefs

Microsoft Security | Microsoft Purview
0 comments No comments

1 answer

Sort by: Most helpful
  1. Pilladi Padma Sai Manisha 7,310 Reputation points Microsoft External Staff Moderator
    2026-02-27T14:54:38.7766667+00:00

    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

    1. 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"]}.

    1. 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.

    1. 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.


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.