Data map history (preview)
Important
This feature is currently in preview. The Supplemental Terms of Use for Microsoft 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 both the free and enterprise versions of Microsoft Purview.
Currently, you can view your assets' history either:
- In the Audit solution in the Microsoft Purview portal
- Within individual solutions
- Using the REST API
Prerequisites
Before you can use data map history, make sure that the audit log is turned on in your organization. If it's not, you'll need to turn it on to access your data map history.
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
For a full list of available operations in Data Map History, see the audit log activities documentation.
Important
Data map history entries are kept in Audit for 180 days, and are available for 30 days in the in-solution experience. To view audit history for longer, you can use Microsoft Purview Audit (Premium).
Audit solution experience
To view the activities within the Audit solution, follow these instructions:
Navigate to the Audit solution within Microsoft Purview
Select Search to search for audit records
Select time range for activity.
Narrow the scope of your search using Activities - friendly names, Activities - operation names, or Record types.
Tip
For the list of available activities, see the audit log activities page
Select Search and wait for job state to change to Complete.
Select your search from the list, and scroll through or filter the history table to find the operations you're looking for.
In-solution history experience
Note
In-solution experience is currently only available for classifications, data assets, business assets, and glossary terms.
To view the activities, follow these instructions:
Search for a data asset, glossary term, or classification in the Microsoft Purview Data Catalog.
Select the History tab.
Scroll through or filter the history table to find the operations you're looking for.
Query Audit log using the REST API
You also can use the Microsoft Purview REST API to access your data map history.
- To authenticate with the REST API, follow the instructions on the Authenticate for APIs page.
- 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
- Retrieve the history of a specific operation
- Filter by user who edited an asset
- Filter by keywords
- Example with pagination
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.
Tip
For the list of available operations, see the audit log activities page.
{
"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
- Currently, it takes a couple minutes for an operational item to appear in an assets History tab.
- Currently, to see a new item in the History tab, you need to manually refresh the tab.