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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How can I automate audit log deletion in dynamics 365

(0) ShareShare
ReportReport
Posted on by

Hi All,

I am looking at the possibility of automating audit log deletion in my dynamics organization. I am particularly looking at scheduling audit log deletion such that I can set retention on audit logs such that it automatically deletes the logs once the retention period is met. 

Please suggestions are welcomed.

Thank You

Asabix

I have the same question (0)
  • Suggested answer
    Yiming Profile Picture
    Microsoft Employee on at

    Hi Asabix,

    I am afraid that we cannot delete the audit log automatically for online CRM environments.

    CRM audit log will have a partition every three months. You can check and delete them regularly through Settings > Auditing > Audit Log Management. You are able to manage through the deletion of audit logs in this spot. 

    Auditforum.png

  • Asabix Profile Picture
    on at

    Thank You Yiming.

    I know OOTB we cannot automatically delete audit logs. I was hoping in this new world of power platform, if we could use MS flow to schedule a reoccuring job that will audit logs to be deleted based on set trigger and conditions.

    Thank You

    Asabix

  • Cgrady Profile Picture
    30 on at

    Hi Asabix, 

    Did you ever end up creating a MS flow to auto-delete logs? If so, would you be able to share the steps you took to make this work?

    Thank you! 

    - Cindy 

  • Suggested answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    Hello Asabix,

    Please take a look at Dynamics 365 workflow tool: https://github.com/demianrasko/Dynamics-365-Workflow-Tools/blob/master/docs/DeleteRecordAuditHistory.md 

    Also, see this thread: https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/305110/how-to-delete-mscrm-audit-logs-through-c-custom-code/881063

    This might be helpful in your scenario 

  • Suggested answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    Hi, 

    According to wave 1 2021. Audit logs will be automatically deleted per the retention period. Please refer to docs:

    https://docs.microsoft.com/en-us/power-platform-release-plan/2021wave1/data-platform/dataverse-auditing-enhancements

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 164

#2
ManoVerse Profile Picture

ManoVerse 147 Super User 2026 Season 1

#3
Zhilan Profile Picture

Zhilan 55

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans