web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to get Audit history data using sql

(0) ShareShare
ReportReport
Posted on by 645

I need to create a report using SQL of audit history for a specific entity and a specific field in the entity (old value vs new value) is it possible? I'm using on-premisse 2016

I have the same question (0)
  • Verified answer
    Marco.P Profile Picture
    2,405 on at

    Hi,

    yes, it's possible.

    Here's a link to help you write down a query to extract data:

    https://community.dynamics.com/crm/b/mscrmcustomization/posts/ms-crm-audit-database-table-details

    Also you can use some XrmToolbox plugin such as :

    https://www.xrmtoolbox.com/plugins/AuditHistoryExtractor/

    https://www.xrmtoolbox.com/plugins/MESquare.XrmToolBox.AuditExplorer/

    https://www.xrmtoolbox.com/plugins/BDK.XrmToolBox.UserAuditViewer/

    Hope it helps,

    Marco

  • Suggested answer
    Johao Larios Profile Picture
    1,795 on at

    Hello, 

    I recommend you use the SDK as described here: https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/retrieve-and-delete-the-history-of-audited-data-changes 

    If you want more info about the audit table, you could check here: 

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/entities/audit

    My recommendation is use the SDK.


    Regards

  • Verified answer
    meelamri Profile Picture
    13,216 User Group Leader on at

    Take a look:

    marcuscrast.wordpress.com/.../

    community.dynamics.com/.../using-audit-history-in-ssrs-reports

    Basically you will use ChangeData columns of AuditHistory table.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans