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

Dataverse Audit Entity

I am trying to pull the auditing into my Canvas app to show users the information of what changed and when. I have managed to get the table pulled in fine but I cannot manage to get some of the information to show.

 

When I try to identify the Changed Field, it gives me the integer ID for the field. Is there any way for me to display the following:

 

Changed Filed Display Name

Old Value

New Value

 

I know this information is sitting in the audit logs as I can see them from the audit summary, but I cannot seem to get them pulled through to my app. Here is a screenshot of what I have:

 

sammybridge_0-1615810184794.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisPiasecki
Super User
Super User

Hi @sammybridge ,

 

Unfortunately you can't retrieve the change data directly from the audit record (the field is internally used and not readable) . To get the change history you need to use the Web API to invoke the RetrieveAuditDetails function, passing in the Audit ID you want to look at for the specific entry. 

 

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/retrieveauditdetails?view=d...

 

You could use a Power Automate button flow, using an HTTP action inside the flow to retrieve the audit information and return the result back to your Power App. The example below is slightly different than what you are trying to achieve, but demonstrates how to do the setup to make the HTTP call to Dataverse.

https://www.bythedevs.com/post/get-record-change-history-of-audited-entities-in-power-automate

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

2 REPLIES 2
ChrisPiasecki
Super User
Super User

Hi @sammybridge ,

 

Unfortunately you can't retrieve the change data directly from the audit record (the field is internally used and not readable) . To get the change history you need to use the Web API to invoke the RetrieveAuditDetails function, passing in the Audit ID you want to look at for the specific entry. 

 

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/retrieveauditdetails?view=d...

 

You could use a Power Automate button flow, using an HTTP action inside the flow to retrieve the audit information and return the result back to your Power App. The example below is slightly different than what you are trying to achieve, but demonstrates how to do the setup to make the HTTP call to Dataverse.

https://www.bythedevs.com/post/get-record-change-history-of-audited-entities-in-power-automate

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

Hi @ChrisPiasecki 

 

Thanks very much for your reply.

 

I actually tried to do it in Power Automate to begin with and got so far without the using the API part, but I was missing the old value, new value and field that was changed which as you can imagine are all essential for an audit log.

 

The approach you sent over looks good and I'll definitely give that a try and see if I can get it working. Happy to mark as the solution if I can get it going. Will report back ASAP!

 

EDIT: with a bit of configuration this is showing me an old and new value of the field that was edited so should give me what I need.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,117)