An error occurred on your Dynamics 365 portal? Did you know it was possible to record relevant details and consult themThis way, more information on the causes of the error will give you clues as to how to correct it. But how can one do it, you may askBy connecting Dynamics 365 to Azure for error logging! 

Before we start, make sure that: 

  • your organization runs the Microsoft Dynamics 365 Portal;  
  • it runs online (and not as an on-premise software);  
  • you have an MSDN account with a $150–$200 credit on Microsoft Azure. 

Ready to fix bugs more efficientlyIn only twenty minutes, you will make a simple adjustment that will make your work easier. In this article, you will learn how to log future bug details on your platformSo, here are 3 simple steps to connect Dynamics 365 to the Azure cloud computing platform and log error information.  

  1. ConfigurMicrosoft Azure (so it can get the error messages)  
  2. Configure Microsoft Dynamics 365 (so the platform saves error details)  
  3. Test it out (to see the bugs)  

Why log portal errors? 

For example, you are currently developing your organizations client space. While doing so, a bug occurs. 

After having configured these settings, you will be able to fix the issue more easily. Simply knowing the date and time of the bug will allow you to find out exactly what created the anomaly. 

 

1. Open MSDN (Visual Studio) to configure error logging  

For this first step, go to https://my.visualstudio.com and log inThen follow these instructions:  

a. Activate your free Azure credits 

In order to benefit from a new service on your cloud computing platform, click the button to activate your free credits. 

Plateforme infonuagique, cloud, Visual Studio, Azure

b. Open the Azure portal  

Nowgo to https://portal.azure.com/#home.

c. Create a resource 

Among the available options, select Create a resource.  

d. Type storage account 

In the search bartype storage account.  

e. Click on Create  

Its time to create your Microsoft Azure storage account.  

Why create an Azure account? Actually, by opening an account on the cloud platformyou get:  

        • a unique name space for your data, accessible from anywhere;  
        • a durable and secure storage account for your data.  

f. Fill in the required fields 

Enter the required information in the fields marked with an asterisk:  

    • Subscription 
    • Resource group 
    • Storage account name 
    • Location 

Then click on Next and keep clicking that button to accept default optionsFinally, click on Create.  

g. Open the resource 

Once the deployment is completed, open the resource and copy the access key.  

 

 

2. Configure error logging on the Power Platform admin center  

Now that the storage account is ready, you can configure the portal to log errorsTo do sofirst open the Microsoft Power Platform admin center by clicking here: https://admin.powerplatform.microsoft.com/.  

a.    Select your environment  

Firstselect your environment, then click on the Portals link.  

b. Select Manage 

Then go to the section that will allow you to manage your portals. 

c. Update the diagnostic logging configuration 

Under Portal Actionsupdate the diagnostic logging configuration.  

d. Paste the access key

You can now paste the access key you copied on step 1.g in the connection string:  

 

3. Test your new error logging configuration 

Its testing time! Now that youve configured Azure so it can receive error messages and Dynamics 365 so it can save them, youre ready to see it in action.   

a. Generate bug!  

In your portal, carry out the action that usually produces an errorThengo back to your storage account and click Open in Explorer. 

 

b. Open the blob container and the telemetry logs  

Now open the blob container section to reach telemetrylogs.   

c. Find the latest file in the results  

Thenkeep double-clicking until you find the relevant date and time, and download the latest file.   

d. Inspect the lines 

You can now open the file in a text editor (e.g. Notepad++). Go to the end of the file and inspect the lines there.   

For example, this is what it could look like:

 

All errors are now being logged!   

From now on, all errors will be recorded, and you will be able to consult them at any timeFixing bugs will be a piece of cake!    


This article is an initiative of our expert Jean-François Fortin.  

 

To go further  

Heres another useful debugging tool:  

  • Fiddler (to intercept web requests) 

Want to learn more?

Our team can assist you with personalized advicetrainings, or new customized solutions. Optimize your technologies and daily process: get in touch with one of our experts.