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

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
Microsoft
Microsoft

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.

@alrez  Thanks for your reply.

 

I am deleting like this.

 

Audit history - Deletion failure 2.PNG

 

 

Thanks

Vik

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.

@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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (5,312)