Skip to main content

Notifications

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

  • Verified answer
    meelamri Profile Picture
    13,216 User Group Leader on at
    RE: How to get Audit history data using sql

    Take a look:

    marcuscrast.wordpress.com/.../

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

    Basically you will use ChangeData columns of AuditHistory table.

  • Suggested answer
    Johao Larios Profile Picture
    1,795 on at
    RE: How to get Audit history data using sql

    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
    Marco.P Profile Picture
    2,405 on at
    RE: How to get Audit history data using sql

    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

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 the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106 Most Valuable Professional

#3
Eugen Podkorytov Profile Picture

Eugen Podkorytov 102

Overall leaderboard

Product updates

Dynamics 365 release plans