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,...
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
    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,216 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

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 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans