Data map history (preview)

Important

This feature is currently in preview. The Supplemental Terms of Use for Azure Previews include additional legal terms that apply to Azure features that are in beta, in preview, or otherwise not yet released into general availability.

When a user updates an asset in Microsoft Purview, data map history logs that change and makes the information available in the Microsoft Purview portal. Information about who added or edited an asset, what edits were made, and when the edit happened, is stored for reference later. This information helps data auditors and business owners to maintain compliance and security in their Microsoft Purview accounts. It also allows data stewards and admins to debug issues and curation in their data assets.

Data map history is available to users in the enterprise versions of Microsoft Purview.

Which assets have history

Currently, these kinds of assets have data map history available:

  • Classifications*
  • Data assets*
  • Glossary terms*
  • Business assets*
  • Domains
  • Collections
  • Role assignments
  • Data sources
  • Scan
  • Scan rule set
  • Credential
  • Policy

* In-solution experience is currently only available for classifications, data assets, business assets, and glossary terms.

How to use data map history

Data map history allows you to see the operational history of changes to your data map assets in Microsoft Purview.

You're able to see the history for select operations that include:

  • Creation
  • Updates
  • Assignment

To view the activities, follow these instructions:

  1. Search for a data asset, glossary term, or classification in the Microsoft Purview Data Catalog.

  2. Select the History tab.

  3. Scroll through or filter the history table to find the operations you're looking for.

    Screenshot of the in-solution history experience, with the history tab highlighted.

Query Audit log using the REST API

You also can use the Microsoft Purview REST API to access your data map history.

  1. To authenticate with the REST API, follow the instructions on the Authenticate for APIs page.
  2. Use the authentication token to POST to this request URL: https://api.purview-service.microsoft.com/datamap/api/audit/query?api-version=2023-10-01-preview

Here are a few example API calls you can use to get started:

Retrieve an asset's history in a time range

Get all audit history of an asset within a specific time range.

{
  "category": "Asset",
  "guid": "f432d351-5442-4724-945b-516d5d501fc9",
  "startTime": "2024-01-01T00:00:00.000Z",
  "endTime": "2024-01-06T00:00:00.000Z",
  "sortBy": "CreationTime",
  "sortOrder": "Descending"
}

Retrieve the history of a specific operation

Get the history of specific operation type. For example, when classifications are applied to the asset.

{
  "category": "Asset",
  "guid": "f432d351-5442-4724-945b-516d5d501fc9",
  "operationType": "ClassificationAdded",
  "sortBy": "CreationTime",
  "sortOrder": "Descending"
}

Filter by user who edited an asset

{
  "category": "Asset",
  "guid": "f432d351-5442-4724-945b-516d5d501fc9",
  "userId": "contoso@microsoft.com",
  "sortBy": "CreationTime",
  "sortOrder": "Descending"
}

Filter by keywords

Filter by keywords such as a changed attribute name, attribute value, etc.

{
  "category": "Asset",
  "guid": "f432d351-5442-4724-945b-516d5d501fc9",
  "keywords": "userDescription",
  "sortBy": "CreationTime",
  "sortOrder": "Descending"
}

Example with pagination

After the first query, if the "lastPage" property in the response body is false, the use can use the "continuationToken" in the response body to fetch the next page.

{
  "continuationToken": "TY7BbsIwEAV%2fKDZr4oQ0KAcEVKo4klNvK�",
  "category": "Asset",
  "guid": "f432d351-5442-4724-945b-516d5d501fc9",
  "sortBy": "CreationTime",
  "sortOrder": "Descending",
  "pageSize": 10
}

Limitations

  1. Currently, it takes a couple minutes for an operational item to appear in an assets History tab.
  2. Currently, to see a new item in the History tab, you need to manually refresh the tab.

Next steps