Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Accessing Dataverse Audit

(0) ShareShare
ReportReport
Posted on by

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, 

pastedimage1682436694023v1.png

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:

pastedimage1682437086942v2.png

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

pastedimage1682437367108v5.png
> Using the new Search that will generate a search job with the details

pastedimage1682437270804v3.png

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.

pastedimage1682450078513v1.png

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:

pastedimage1682449470516v7.png

If we try using PowerBI you have two possible approaches:

> Using dataverse connector. However, this won't allow us to access the Audit table:

pastedimage1682449907919v9.png

> 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:

pastedimage1682449789079v8.png

This is an interesting approach, as we're allowed to query data and login, and build our reports of environment access.

Hopefully this helps!

  • a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Accessing Dataverse Audit

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans