Hey Team!
Interesting & common topic: How can you retrieve the Audit History in a massive way? Well, the first pre-requisite is to Enable auditing. You can follow the indications on https://learn.microsoft.com/en-us/power-platform/admin/manage-dataverse-auditing#startstop-auditing-for-an-environment-and-set-retention-policy. After this, you have a few important points, documented on the same location:
- You can enable more detailed Auditing on a specific table or field, according to https://learn.microsoft.com/en-us/power-platform/admin/manage-dataverse-auditing#configure-auditing-for-one-or-more-tables-and-columns-in-power-apps
- Access a particular record, on the contextual ribbon go to "Related" or directly to any "Audit history"
- Finally, access ALL the logs using the "View Audit Logs" that shows when you want to delete,
However, all of these points have some important considerations:
a) you can only sort by the "Changed Date".
b) The web client will NOT allow exporting
c) As this is a webClient, we might be challenged by the number of records we want to see.
d) We might not have an easy way to see the changed performed:
However, by enabling the Audit logs, data will be available on the COmpliance Portal (Purview) as documented on https://learn.microsoft.com/en-us/microsoft-365/compliance/audit-log-activities?view=o365-worldwide IN here, you have 2 options:
> Using the classic view, that will perform a search in real time
> Using the new Search that will generate a search job with the details
Of course, this has some problems as well: This will search on all D365 Environments and results might not fit the search results you're looking for, specially if you have several environments.
However, you have a nice Export button that might assist you in performing a better search using excel
But, what if I want a more robust search? Well, based on (+) Dataverse Advanced Audit Log Deletion using the BulkDelete API - Microsoft Dynamics 365 Community and (+) Dataverse Advanced Audit Log Deletion using the BulkDelete API - Microsoft Dynamics 365 Community, you can use a couple interesting approach:
- Follow those guidelines to make a set of HTTP Requests to retrieve the Audit records using the API. IN this case, read those two posts.
- How about using PowerBI?
If we make a call to [environmentURL]/api/data/v9.2/audits, we'll get the details of all the records in a JSON format:
If we try using PowerBI you have two possible approaches:
> Using dataverse connector. However, this won't allow us to access the Audit table:
> Using HTTP Request. In this scenario, you are asked for the URL (same as the one we used before: environment/api/data/b9.2/audits ) that will allow us to check the details:
This is an interesting approach, as we're allowed to query data and login, and build our reports of environment access.
Hopefully this helps!
Hello,
There is no easy and straight forward to receive logs in a bulk way.
You should check SSIS and KingsWay soft adapters - www.kingswaysoft.com/.../Extracting-Audit-Logs-for-Multiple-CRM-Entities
André Arnaud de Cal...
292,162
Super User 2025 Season 1
Martin Dráb
230,962
Most Valuable Professional
nmaenpaa
101,156