Skip to main content

Notifications

Export all Audit enabled Entities and Attributes in D365 CRM

Introduction:

As your Dynamics 365 system grows and evolves, it becomes increasingly important to keep track of all the entities and attributes that are currently enabled. Not only does this help ensure security and compliance, but it also facilitates effective data management and reporting. 

It is essential to review your audit configurations at the Entity and Attributes levels to ensure you are only auditing necessary records. This will prevent excessive growth of your audit log storage. 

In this article, we'll explore how to generate a report about all entities and attributes in which the Audit feature is enabled in D365.

There are many ways can achieve our goal, Next, I will show them one by one.

Manner 1:  From the Solution List

In D365, you can get a list of entities that have the audit feature enabled by following these steps:

Step 1: Go to Settings > Customizations

Step 2: Customize the System.

Step 3: Click on Components > Entities.

In the Entity View, click on Audit.

Now you will see a list of all entities that have the Audit feature enabled.

8371.pastedimage1683980311469v1.png

For attributes, we can go to the Fields View within the Entity Level.

1447.pastedimage1683980497456v2.png

    This manner can only view entities/fields one by one and can't export all configurations. Therefore, this way is not suitable for reports or further analysis.

Manner 2: Export the metadata through the Metadata Document Generator Plugin in XrmToolBox

Step 1: Connect to your Dynamics 365 instance Log in to your Dynamics 365 instance using an account with administrative privileges.

Step 2: Install XrmToolBox if not already installed If you haven't already done so, install the popular XrmToolBox application from its website (http://www.xrmtoolbox.com/).

Step 3: Install the Metadata Document Generator plugin in XrmToolBox Once you've got XrmToolBox set up and running, click on the "PluginStore" tab and search for "Metadata Document Generator." Click on the plugin and then select "Install."

Step 4: Open Metadata Document Generator in XrmToolBox and Load Entities

Step 5: Check the 3 settings below at the bottom of this tool.

5706.pastedimage1683981576842v5.png

Step 6: Generate Report Click on the "Generate document" button to generate the report about all enabled entities and attributes in D365.

From the Entities list sheet, you can analyze the Audit enabled Entities

pastedimage1683985138931v1.png

From the Metadata sheet, you can break it down to the Audit enabled Attributes

pastedimage1683985289913v2.png

Manner 3: Through the Dataverse Web API query all the Entities and Attributes and Export them into Excel for further reporting and analysis.

Step 1: Build a query like this:

https://yourorgname/api/data/v9.1/EntityDefinitions?$select=LogicalName,IsAuditEnabled&$filter=IsAuditEnabled/Value%20eq%20true&$expand=Attributes($select=LogicalName,IsAuditEnabled;$filter=IsAuditEnabled/Value%20eq%20true)

replace yourorgname with your real org.

Step 2: Export into Excel

For how to export into Excel, please refer to this link for a step by step guidelines. 

Export D365 Web API result into Excel

In conclusion, 

The manner 1: solution list method only allows for viewing entities and fields one by one and cannot export all configurations, the other two methods provide more comprehensive reporting and can be exported for further analysis and visualization purposes.

Hope it's helpful.

The End.

Comments

*This post is locked for comments