cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Flow - Audit History deletion - The 'Delete' method does not support entities of type 'audit'.

Hello everyone

 

I have a task to automate deletion of audit history in Dynamics 365.

 

I created a flow to delete the audit history of a candidate.

 

It failed with this error "The 'Delete' method does not support entities of type 'audit'."

 

Audit history - Deletion failure.PNG

 

Do we know why Flow cannot delete audit history?

 

 

Thanks

Vik

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Flow - Audit History deletion - The 'Delete' method does not support entities of type 'audit'.

Hi Vik,

 

This error looks very similar to a similar issue that came through. How are you trying to delete this audit logs? It appears that you can only delete audit logs if its by date, according to the link below; That might be the issue you are encountering. If that doesn't help this may require a service desk ticket as I think this should be able to be done through flow.

 

In addition I believe there is some functionality within the audit center itself to upkeep audit logs.  Settings –> System –> Auditing –> Audit Log Management.

 

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/160313/can-t-delete-audit-log

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Helper II
Helper II

Re: Flow - Audit History deletion - The 'Delete' method does not support entities of type 'audit'.

@alrez  Thanks for your reply.

 

I am deleting like this.

 

Audit history - Deletion failure 2.PNG

 

 

Thanks

Vik

Highlighted
Community Support
Community Support

Re: Flow - Audit History deletion - The 'Delete' method does not support entities of type 'audit'.

Hi Vik,

 

Looking at your Flow here I did a little more digging to see if I could find the issue. I found the article below; here which states "You can only delete the oldest audit log in the system. To delete more than one audit log, continue to delete the oldest audit log until you have deleted enough logs." Unfortunately, this doesn't appear to be supported to delete specific ones.

 

https://docs.microsoft.com/en-us/power-platform/admin/recover-database-space-deleting-audit-logs

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Helper II
Helper II

Re: Flow - Audit History deletion - The 'Delete' method does not support entities of type 'audit'.

@alrez Yes I dont think flows is a good option for my requirement. I am going with ETL package to do this work. I have tested this with a SSIS package using Kingsway soft and it is possible to delete specific audit logs.

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (8,791)