Microsoft Purview provides REST APIs that allow you to query classification metadata across your data estate. However, it’s important to clarify that Purview does not track actual “record counts” of classified data (e.g., number of rows labeled as “All full names”) at the row level. It works at the metadata level, i.e., identifying which columns or assets are classified with specific labels.
How to get the total number of assets/columns classified as “All full name”
You can use the Scan Results / Classifications API to list assets or columns that have a specific classification applied.
Steps:
- Use the Purview Search API to find all assets with the classification "All full names":
POST https://<your-purview-account-name>.purview.azure.com/catalog/api/search/query?api-version=2023-09-01-preview
Sample Payload:
{
"keywords": null,
"limit": 100,
"filter": {
"classification": ["All full names"]
}
}
- Count the number of results returned (you can paginate using the
offset
parameter). - Optionally, filter by asset type or data source in the request body.
Exporting this to Power BI with filters by asset or data source
There’s no direct connector yet, but you can follow this workaround:
Option 1: Azure Function / Logic App
- Create an Azure Function or Logic App that calls the Purview Search API regularly.
- Parse and structure the results (e.g., asset name, data source, classification).
- Store the results in a staging location (Azure SQL, Blob Storage, or Data Lake).
- Connect Power BI to that storage for reporting and filtering.
Option 2: Azure Data Factory (ADF)
- ADF Web Activity can call the Purview API and capture results.
- Store and transform that data into a Power BI-friendly format.
You’ll need to register an Azure AD app, grant it Purview Data Curator or Reader role, and authenticate using OAuth2 when calling the API.
Reference: https://learn.microsoft.com/en-us/rest/api/purview/
I hope this information helps. Please do let us know if you have any further queries.
Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.