Skip to main content

Notifications

Announcements

No record found.

Finding all audit enabled tables and columns for your Dataverse environment

As a best practice in maintaining your Common Data Service environments, it is important to review your audit configurations at the table and column levels to ensure you are only auditing records that are necessary. This will prevent excessive growth of your audit partitions. If you are wondering what I mean by table and columns, see this post.

The problem is easily identifying each and every column within every table. Here is how you do it.

 

Using the webAPI, create the following query:

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

 

If you run this in your browser, it will return a list of tables and columns that are enabled for auditing in JSON format. Now, you need an easy way to read and analyze the data.

 

Let's see how we can do this with Excel.

 

First, open a new blank workbook in Excel and select the Data tab

Click Get Data | From Online Services | From Dynamics 365 (online)

0336.pastedimage1605292203930v1.png

 

Copy and paste your webAPI query from above and click OK

2402.pastedimage1605292386700v2.png

 

Click Transform Data

5226.pastedimage1605292426512v3.png

 

Click the expand button next to Attributes

0028.pastedimage1605292495188v4.png

 

Uncheck IsAuditEnabled and click OK

4743.pastedimage1605292531049v5.png

 

Finally, click Close & Load

7002.pastedimage1605292551484v6.png

 

You can do the same thing in Power BI. Check out below:

 

Open a new Power BI report and select Get Data and click More

6087.pastedimage1605292797714v7.png

 

Then, select Online Services and Dynamics 365 (online)

1881.pastedimage1605292831301v8.png

 

Click Connect and paste your webAPI query into the window

1055.pastedimage1605292874686v9.png

 

Click Transform Data

5482.pastedimage1605292901900v10.png

 

Click the expansion next to Attributes

5123.pastedimage1605292940439v11.png

 

Uncheck IsAuditEnabled

0550.pastedimage1605292957861v12.png

 

Click Close & Apply

4452.pastedimage1605292974719v13.png

 

Once it refreshes, you will have a full list of tables and columns for your review.

 

I hope this helps!

 

Thank you for reading!

Aaron Richards

 

 

Comments

*This post is locked for comments