In the 10.0.30 release of D365FO, which went GA on Oct 21st 2022, Microsoft added the ability for customers to report on the telemetry data of their end users. I wanted to take a quick overview of this feature and start to look at opportunities to use this data.
Prerequisites
The telemetry data from Microsoft is stored in Azure Application Insights, so we have to create a resource for us to store this data in. Once created please note the Instrumentation Key as we will need that in subsequent steps.
How to Enable Telemetry
First and foremost, this feature is labeled as a ‘preview feature’ so it is not enabled by default so we have to navigate to System Administration -> Workspaces -> Feature Management and search for ‘monitoring and telemetry’. You can see the Status below is marked as the yellow triangle with exclamation point, indicating it is not enabled.
After enabling the feature, you can see the Status change to the green check mark.
Now we can navigate to System Administration -> Setup -> Monitoring and Telemetry Parameters.
We can now configure which events we want to enable in the Configure tab, specifically for our case we want to enable the Form Runs, User Sessions, and X++ exceptions:
In the Environments tab, the LCS Environment variable is the Instrumentation Key from your Application Insights resource from the previous step. The Environment Mode should be set to whatever environment you want you are connecting to.
In the Application Insights Registry tab, we again will input our Environment Mode and Instrumentation key values.
Once these values are set, the configuration portion for telemetry data is complete.
Telemetry Data Reporting
In the Application Insights resource we created initially within Azure, we can navigate to the Monitoring -> Logs area and see the tables available for us to query. The data in Application Insights can be queried using the Kusto Query Language (KQL). For example, in the screenshot below we can see we can query the ‘pageviews’ table to see all page views from users.
External Reporting
If we want to export the results of our KQL query we have a couple different options. The Export to CSV and Excel options are fairly standard, but one nice addition here is the ‘Export to Power BI’ option.
If we choose that option it exports a text file with the following instructions commented out at the top.
Follow the steps and copy the entire contents into an ‘Advanced Editor’ in PowerBI.
After authenticating, the PageViews table data is successfully pulled into PowerBI.
And we can create different PowerBI visualizations using this data.
We can also access this data via an API call if you want to access this data externally the Application Insights API. There is an endpoint where we can execute a query we pass in which allows for us to do something like this:
Conclusion
Hopefully this overview was helpful on how to set up telemetry in your D365FO instance and the flexibility you have on accessing that data through a number of different options.
I have just scratched the surface into what this sort of data allows us to do, what cool features/functionality do you think we can make with this data?
Hi,
Thanks for the article, i know that it’s a hard ask, but do you check Azure cost?… I know that it depend of user activity, but maybe have the GB submitted from a XX users, can be possible try to predict for 2XX users and so on
Gabriele,
You are absolutely correct that you would want to take your Azure storage costs into consideration as part of enabling this feature. Currently, the feature can only be turned on/off, there is no way to say ‘only track these users’.
But you could potentially turn it on for say 1 month and extrapolate usage that way.
Thank you for your guide. This also works for development boxes.
I hope that Microsoft will transition all of the information that exists in LCS raw logs to application insights. The reporting tools in azure are much better than in LCS.
I am looking forward to being able to add custom events from X++ code.
link:
https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/sysadmin/monitoring-and-telemetry-appinsights
Hi Alex,
Thanks for the excellent information provided by you. Do you know if there is any more advancement in this field by Microsoft. I am looking to get the total user data (form navigations, button clicks etc.) for task mining purpose.
Although there are some MS learn link talking about a JavaScript SDK which can extend the data collection but I don’t think it is directly possible in Dynamics solution.
https://learn.microsoft.com/en-us/azure/azure-monitor/app/usage-flows
Please let me know if you know any more details on it.
Regards,
Deepak
Deepak,
I have not heard of any additional advancements as far as new events being tracked.
I can see two options for your situation:
– Utilize the ‘custom telemetry events’ to add additional logging – I go over this feature here: https://alexdmeyer.com/2023/10/03/using-telemetry-data-for-read-auditing-in-d365fo/
– While not telemetry based, the task recording tool within D365FO would allow you to capture this level of detail.
Hi Alex ,
Thanks sharing this detailed blog.
I configured this monitoring & telemetry feature to find out the page views by end users, but it seems that log shows page views data of only 3 users but there other users as well in D365 FO environment.
Please let me know know if how i can get data of all the users.
Mayank,
This feature should track page views for all users within your environment, there is no additional settings to track certain users. I have not ran into an issue where only certain users are tracked.
Is this a tier 1, tier 2, or prod instance of D365FO?
Hi Mayank, we have recently turned this on and have found that we only have about 40 users coming through but can confirm daily usage of 250+. Have did you manage to resolve the issue with all user pageviews not coming through?
Tim,
As there has now been multiple reports of this type of behavior happening, I have reached out to some Microsoft folks to get their input on this.