Diagnostic logging in PowerApps portals/ Dynamics 365 Portals

Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at info@xrmforyou.com

In this blog, I will explain diagnostic logging feature in PowerApps Portal.

This blog is basically a sub-topic of this blog here. In that blog, I explained in-depth the complete error management in PowerApps Portal. I strongly suggest to read that blog to be with the flow.

To debug server side exceptions in power apps portals reported by customers/users you need to access the error logs. In this blog post I will explain you how to access the portal logs by sending all application errors to Azure Blog storage account.  Accessing error logs help to identify the root cause of the issue occurred.

Let’s follow the below steps to achieve this.

Step 1:  You need to have an active Azure subscription to configure portal error logs.

Login to your Azure Portal and create a Storage Account. Navigate to “Create a resource” section.

Diagnostic logging in portals

Under storage, choose Storage account. Fill up the below details.

Diagnostic logging in portals

Choose your resource group and provide the storage account name as shown below

Diagnostic logging in portals

Click on Review and Create and then Create a storage account after all validations are passed.

Under settings-> Access keys and copy connection string

Diagnostic logging in portals

You will also like the below posts

Step 2: Go to Power Apps Portal Admin center – > Portal Actions -> Enable Diagnostic logging

Diagnostic logging in portals

Click on enable diagnostic logging which throws up a pop screen to fill the details

Diagnostic logging in portals

Provide the copied connection string of your storage account and configure the retention period. Default period is 30 days.

Diagnostic logging in portals

Click Configure once it is configure a confirmation pop up shows up as below

Diagnostic logging in portals

Once diagnostic logging is configured, a new telemetry-logs blob container is created in your Azure storage account and the logs are written into the blob files stored in the container.

Below screenshot for reference

Diagnostic logging in portals

To test this go to your portal and validate it by making an exception. You will find logs in the telemetry logs section.

Diagnostic logging in portals

Open the csv file to understand the error

Diagnostic logging in portals

As highlighted, you can see the exception log. Using this technique we capture and view the portal error logs.

When diagnostic logging is enabled, the following actions becomes available:

  • Update diagnostic logging configuration: Allows you to update or remove diagnostic logging configuration for the portal.
  • Disable diagnostic logging: Allows you to disable diagnostic logging configuration for the portal.

Check out my recent posts

Hope this helps!
Debajit Dutta
(Business Solutions MVP)


Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe to get the latest posts sent to your email.

Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading