Monitor and troubleshoot Dynamics 365 Customer Engagement (on-premises)

In Dynamics 365 for Customer Engagement, you can create trace files that monitor the actions that are performed by the server and client applications. Trace files are helpful when y'all have to troubleshoot error messages or other issues in Dynamics 365 for Customer Appointment.

To enable Dynamics 365 Server tracing, you can employ deployment-level tracing or server-level tracing. Choosing either method determines the range of server roles monitored, the degree of control, and how to enable tracing and the location of the trace files.

Additionally, Microsoft Dynamics 365 Reporting Extensions, Dynamics 365 for Outlook, and Dynamics 365 for tablets tin can be enabled for tracing.

Microsoft Dynamics 365 deployment-level tracing (on-premises versions but)

Deployment-level tracing monitors all Dynamics 365 for Customer Appointment server roles and services, regardless of the server roles installed on the local computer. When deployment-level tracing is enabled, all server roles are monitored such as Asynchronous Service, Sandbox Processing Service, Unzip Service, Web application (w3wp), and Deployment Tools (mmc-Tools). Respective trace files are created.

Deployment-level tracing is set by using Windows PowerShell commands and is maintained in the MSCRM_CONFIG database. Deployment-level tracing can just exist enabled from a calculator that has the Dynamics 365 for Customer EngagementDeployment Tools server office.

The trace files are located in a folder on the computer where the Dynamics 365 for Client EngagementDeployment Tools server office is running. By default, the location is C:\crmdrop\logs.

Circumspection

Trace files may contain sensitive or personal information. Utilise discretion when you transport trace files to other people, or when you give other people the ability to view the information in a trace file.

When you turn on tracing it can significantly affect functioning of the application. We strongly recommend that you merely turn on tracing for troubleshooting bug and plow off tracing later the issue is resolved.

Of import

Earlier you run Dynamics 365 for Client EngagementWindows PowerShell commands, the Microsoft.Crm.PowerShell snap-in must exist registered by running the Add-PSSnapin Microsoft.Crm.PowerShell command.

For more data, encounter Administer the deployment using Windows PowerShell.

Tip

To get a list of the registered Windows PowerShell snap-ins, run the Get-PsSnapin –registered control.

View the electric current deployment-wide trace settings

              Get-CrmSetting TraceSettings                          

Enable deployment-wide tracing

To turn on deployment-broad trace settings that tape the maximum amount of information, including detailed logging with callstack information, run the following commands, in the order provided, from the Windows PowerShell console on the computer where the Deployment Tools server role is running. To enable less detailed logging or to alter the location of the log files, see Optional parameters.

              $Setting = Go-CrmSetting TraceSettings$Setting.Enabled = $True $Setting.CallStack=$True$Setting.Categories="*:Verbose"Set-CrmSetting $setting                          

Optional parameters

  • CallStack. Records callstack information. For detailed troubleshooting, we recommend that you turn this on. By default, this is turned off.

  • Categories. Indicates the level of detail to record.

    • Error. By default, the Categories value is Mistake, which is the least detailed and simply records errors.

    • Alert. Includes warnings and errors.

    • Info. Includes warnings, errors, and additional information.

    • Verbose. Records the nigh detailed information.

  • Directory. Specifies the location of the trace log file. By default, the location is c:\crmdrop\logs.

  • FileSize. Specifies the maximum file size of the log file in megabytes before data in the trace file is overwritten.

Disable deployment-level tracing (on-bounds versions only)

To disable tracing, run the following commands, in the order provided, from the Windows PowerShell panel on the computer where the Deployment Tools server role is running.

              $Setting = Get-CrmSetting TraceSettings$setting.Enabled = $FalseSet-CrmSetting $setting                          

Trace files aren't deleted when tracing is disabled. Additionally, services used by Dynamics 365 Server lock open up the trace files. Therefore, y'all may have to restart any Dynamics 365 for Client Engagement services and the World Wide Spider web Publishing Service if these services are running on the computer where y'all desire to delete the trace files.

Microsoft Dynamics 365 server-level tracing (on-bounds versions only)

Server-level tracing only monitors those Dynamics 365 for Customer Appointment server roles that are running on the local computer where server-level tracing is enabled. When server-level tracing is enabled, trace files that are specific to the Dynamics 365 for Client Engagement server roles or services that are running on the local computer are created. Server-level tracing does not require the Deployment Tools part and can provide a greater degree of control where you lot tin set specific trace values such every bit what Dynamics 365 for Customer Engagement features to trace or the maximum trace file size.

For more data virtually setting server-level tracing properties in Dynamics 365 for Customer Engagement, run into How to enable tracing in Microsoft Dynamics CRM.

If both deployment-level and server-level tracing are enabled on the same computer, only server-level tracing volition be used.

Server-level tracing must be manually set in the Windows registry on the computer where one or more Dynamics 365 for Customer Appointment server roles are running.

The server-level tracing files are located in the Traces folder of the Dynamics 365 for Customer Engagement installation folder. By default, the location is C:\Program Files\Microsoft Dynamics CRM\Trace.

Enable or disable server-level tracing

Caution

Trace files may contain sensitive or personal information. Use discretion when yous send trace files to other people, or when you give other people the power to view the information that a trace file contains.

When you plow on tracing it can significantly bear upon performance of the application. We strongly recommend that you only plow on tracing for troubleshooting problems and turn off tracing after the issue is resolved.

Caution

This job contains steps that tell you how to change the registry. Withal, serious issues might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps advisedly. For added protection, dorsum up the registry before you alter information technology. So, you lot can restore the registry if a problem occurs. For more information nearly how to back up and restore the registry, see: How to support and restore the registry in Windows.

On the Dynamics 365 Server that you want to turn on server-level tracing, start RegEdit and locate the following registry location: HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\MSCRM

Create the following ii required new values.

Value proper name Blazon Value
TraceEnabled DWORD (32-bit) 0 or 1

If y'all use a value of 0, tracing is disabled. If you use a value of 1, tracing is enabled.

TraceRefresh DWORD (32-chip) A number betwixt aught and 99

This value must alter for Dynamics 365 for Customer Appointment to observe a change to any of the other trace values in the Windows registry. For example, if the value is 2, you can gear up information technology to 1 so that other trace values changes, such as a modify to TraceCategories, will be applied.

Enable tracing for Microsoft Dynamics 365 Reporting Extensions for SQL Server Reporting Services (on-premises versions only)

In Dynamics 365 for Customer Date, you can create trace files that monitor the deportment that are performed by Microsoft Dynamics 365 Reporting Extensions. Trace files are helpful when you have to troubleshoot error letters or other issues in Microsoft Dynamics 365 Reporting Extensions.

Caution

Trace files may contain sensitive or personal information. Use discretion when you ship trace files to other people, or when you lot give others the power to view the information that a trace file contains.

When you plough on tracing it can significantly affect operation of the awarding. We strongly recommend that you lot only plough on tracing for troubleshooting bug and plow off tracing afterward the issue is resolved.

Yous can enable tracing for Microsoft Dynamics 365 Reporting Extensions in two ways:

Enable tracing using registry values

Enable tracing using deployment properties

Of import

Traces will not be generated if the binder specified in TraceDirectory does non exist.

Enable tracing using registry values

Caution

This task contains steps that tell you lot how to modify the registry. However, serious problems might occur if yous modify the registry incorrectly. Therefore, make sure that yous follow these steps advisedly. For added protection, support the registry before you lot change information technology. Then, you can restore the registry if a problem occurs. For more information nearly how to back upwardly and restore the registry, see: How to support and restore the registry in Windows.

  1. On the computer where you take installed Microsoft Dynamics 365 Reporting Extensions, locate and and then select the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\MSCRM

  2. Fix the following registry values:

    • TraceEnabled = i

    • TraceDirectory = <directory path where traces will be stored>

    You can as well set up other row values like TraceCategories, simply they already take defaults.

  3. Restart SQL Server Reporting Services.

Enable tracing using deployment backdrop

  1. Go to the DeploymentProperties table in the Configuration Database.

  2. Locate the row with the value "TraceEnabled" and fix its "BitColumn" column's value to "True".

    Other row values like TraceCategories, TraceDirectory already take default values, simply you tin change these values.

    You'll start seeing the traces in the directory specified in the TraceDirectory row in the DeploymentProperties table.

  3. Restart SQL Server Reporting Services.

Registry settings accept precedence over deployment backdrop. If there are any invalid entries in the registry, for example, and TraceDirectory does not be, the deployment properties are used.

Enable tracing for Microsoft Dynamics 365 for Outlook

This department applies to Dynamics 365 for Customer Engagement and on-bounds versions of Dynamics 365 for Client Engagement. Dynamics 365 for Outlook tracing monitors the example of Dynamics 365 for Outlook that is running on the local computer. If an event is isolated to a particular user running Dynamics 365 for Outlook, enabling Dynamics 365 for Outlook tracing tin help determine the cause.

The Dynamics 365 for Outlook tracing files are located in the C:\Users\<username>\AppData\Local\Microsoft\MSCRM\Traces binder.

Caution

Trace files may contain sensitive or personal information. Use discretion when you send trace files to other people, or when you give other people the ability to view the information that a trace file contains.

When you turn on tracing it can significantly touch performance of the awarding. We strongly recommend that you only turn on tracing for troubleshooting issues and plough off tracing after the issue is resolved.

Enable or disable tracing for Microsoft Dynamics 365 for Outlook

  1. On the computer running Dynamics 365 for Outlook, select Start, select All Programs, select Microsoft Dynamics 365, and then select Diagnostics.

  2. Select the Avant-garde Troubleshooting tab, and so select Tracing to enable or select to clear Tracing to disable.

  3. Select a Tracking level from the drop-downwardly list.

  4. Select Save.

You can reduce the amount of information during the trace by setting the TraceCategoriesWindows registry value. For case, yous can ready the value so that only fault letters are recorded. Reducing the amount of logging tin can be helpful when you troubleshoot specific bug, such as when you receive error messages going offline. To practice this, follow these steps.

Caution

Turning on verbose tracing during process intense actions such as Outlook startup, or going online and offline with Dynamics 365 for Outlook, is non recommended and could result in stability bug with Dynamics 365 for Outlook.

This task contains steps that tell you how to alter the registry. All the same, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, dorsum up the registry before you modify information technology. And then, you can restore the registry if a problem occurs. For more than data about how to support and restore the registry, see How to support and restore the registry in Windows.

Find that tracing must already be enabled for the post-obit steps to work.

  1. On the computer where you have installed Dynamics 365 for Outlook start RegEdit and locate and so select the following registry subkey: HKEY_CURRENT_USER\Software\Microsoft\MSCRMClient.

  2. If the TraceCategories string value does not be add it. To do this, right-click MSCRMClient, select New, select String Value, type TraceCategories and and then press ENTER.

  3. Right-click TraceCategories, select Alter, type Application.Outlook:Fault, and and so select OK.

For more data about the values available for TraceCategories, come across How to enable tracing in Microsoft Dynamics CRM.

Trace files are not deleted when tracing is disabled.

Enable tracing for Microsoft Dynamics 365 E-mail Router

This section applies to Dynamics 365 for Customer Engagement and on-premises versions of Dynamics 365 for Customer Engagement. Microsoft Dynamics CRM Electronic mail Router tracing monitors the E-mail Router service that is running on the local figurer.

Enable or disable tracing for Microsoft Dynamics 365 E-mail Router

  1. On the computer where the Microsoft Dynamics CRM Email Router service (Microsoft Dynamics 365 Email Router) is running, open Microsoft.Crm.Tools.EmailAgent.xml using an XML or text editor. By default, Microsoft.Crm.Tools.EmailAgent.xml is located in the <drive>:\Program Files\Microsoft CRM Email\Service folder.

  2. Add together the following entries between the <SystemConfiguration> parent elements:

    <LogLevel>Level</LogLevel>
    Specifies the logging level. Acceptable values for Level are 0, ane, 2, or iii.

      1. No logging. By default, logging is set up to 0.
      1. Error logging just.
      1. Detailed data logging at the mailbox level.
      1. Very detailed information logging at the message level.

    <LogFile>Path\Logfilename</LogFile>
    Specifies the full path of the location to the log file.

  3. Restart the Email Router service.

Sample Microsoft.Crm.Tools.EmailAgent.xml

The post-obit Microsoft.Crm.Tools.EmailAgent.xml file sets the logging at level 1 and places the log file at c:\emailRouterLog.txt.

              <?xml version="1.0" encoding="utf-eight"?>   <Configuration>   <SystemConfiguration>   <MaxThreads>50</MaxThreads>   <MaxThreadExecution>600000</MaxThreadExecution>   <SchedulingPeriod>1000</SchedulingPeriod>   <ConfigRefreshPeriod>5000</ConfigRefreshPeriod>   <ConfigUpdatePeriod>3600000</ConfigUpdatePeriod>   <LogLevel>1</LogLevel>   <LogFile>c:\emailRouterLog.txt</LogFile>   <ProviderOverrides>   <CacheCapacity>1024</CacheCapacity>   <PendingStatusDelay>300000</PendingStatusDelay>   <SendingStatusDelay>1800000</SendingStatusDelay>   <MaximumDeliveryAttempts>10</MaximumDeliveryAttempts>   <EWSRetrieveMessageCount>ten</EWSRetrieveMessageCount>   <BatchSize>5</BatchSize>   <RequestBatchSize>five</RequestBatchSize>   </ProviderOverrides>   </SystemConfiguration>   </Configuration>                          

Enable tracing for Dynamics 365 for tablets

Y'all can enable tracing in the Dynamics 365 for tablets app to diagnose issues. When you enable tracing, verbose information is recorded on the device. This information tin can be analyzed to help identify the source of an result. The manner to enable and view tracing differs depending on the tablet operating organisation.

Windows

Follow these steps to view events. Tracing is enabled by default.

  1. Open the Event Viewer. To do this, get to the Kickoff screen, type Run, and and so press or tap ENTER. In the Run box blazon eventvwr, and then press or tap ENTER.

  2. Select the AppHost folder under Awarding And Services Logs\Microsoft\Windows

  3. From the View carte du jour, select Show Analytic and Debug Logs.

    Show Analytic and Debug Logs.

  4. Boosted nodes will appear under the AppHost folder.

    AppHost Folder.

  5. Correct-click (press and hold) the AppTracing node and then select Enable Log.

    AppTracing Enable Log.

  6. Select OK to agree to the following warning.

    Warning: logs may lose events.

  7. Afterwards reproducing the issue, right-click (press and hold) AppTracing so click or tap Disable Log.

    AppTracing Disable Log.

  8. Refresh the Event Viewer to view log events. You tin use F5 or right-click (printing and agree) AppTracing and then select Refresh.

    Refresh AppTracing.

  9. Review the details of events that are logged. Look for entries containing "Dynamics 365" in the field under the General tab.

    AppTracing Find.

    Tip

    You can right-click (press and concur) AppTracing and then select Find to initiate a detect. Then search for any events containing a word such as "Dynamics 365." Ctrl + F is the keyboard shortcut.

  10. Besides check the events logged under Admin.

    To salve an effect log, right-click (press and agree) the log and select Relieve All Events As. Specify the directory where you want to relieve the log file.

    Events logged under admin.

iPad

Follow these steps to set up and view logging on the iPad.

Enable logging on the iPad
  1. Open up Settings.

    iPad Settings.

  2. Select Dynamics 365 from the Settings list.

    iPad Settings Dynamics 365.

  3. The Enable Logging selection is prepare to OFF by default. Toggle this option to switch the setting to ON.

    iPad Enable Logging on.

  4. Later reproducing the outcome, toggle the Enable Logging setting to OFF.

    iPad Settings Dynamics 365.

View the iPad log files
  1. Connect your iPad to your figurer.

  2. Open iTunes.

  3. Select your device from the Devices section.

    iTunes Devices.

  4. Select the Apps area from the header.

    iTunes Apps.

  5. Locate the File Sharing section and select the Dynamics 365 app.

    iTunes File Sharing.

    iTunes File Sharing Dynamics 365.

  6. On the right-side column yous should come across a listing of log files if logging was enabled for the app. Select a log file, printing Save to, and so choose a location to relieve the log file.

    iTunes Save Dynamics 365 log file.

  7. Locate the log file you saved and open it to view the log details.

Android

On an Android device, you tin can enable logging during or later configuration.

  • If you're setting up Dynamics 365 for tablets, encounter Enable logging on the setup page.

  • If you have already configured Dynamics 365 for tablets and encounter an fault post configuration, you need to sign out or reconfigure to enable logging. Run across Enable logging after configuration.

Note

By default, logging is disabled. If you enable logging and shut and reopen Client Date, logging volition be disabled,

Enable logging on the setup page
  1. On the setup page for Dynamics 365 for tablets, tap the ellipses (…) to display the selection to enable logging.

    Enable logging for Android.

  2. Tap the Enable Logging checkbox.

Enable logging after configuration
  1. Open the Dynamics 365 for Android app.

  2. While on the dashboard, tap the ellipses (…) in the bottom-right corner to display the control bar.

    Ellipsis button.

  3. Tap Settings, and then tap Sign out.

  4. On the sign-in page, tap the dorsum button to go to the set up page.

  5. On the setup page for Dynamics 365 for tablets, tap the ellipses (…) to display the pick to enable logging.

    Enable logging for Android.

  6. Tap the Enable Logging bank check box.

View the Android log files
  1. Logging is written to a log file in the MSCRM folder in the root directory of your device. You tin can connect your tablet to your computer with USB to browse the file system. You lot tin also use other visitor's Android apps to view the file arrangement.

  2. Open the MSCRM binder, then select and view the log file.

    Example Android log file.

Sample log

The following case shows you what you lot might run across in a log file.

              2013-08-xx xv:33:23 +0000 [INFO]: Unique install id | 5FDD3711-9E89-4D8B-B835-88B2C7C51703 2013-08-20 15:33:23 +0000 [INFO]: Application activated 2013-08-20 15:33:24 +0000 [INFO]: Awarding resume 2013-08-20 fifteen:33:25 +0000 [ERROR]: App WebView Load failed | -1003 2013-08-20 15:33:32 +0000 [INFO]: [PAL] | Authentication: Starting 2013-08-20 xv:33:32 +0000 [INFO]: [PAL] | Authentication: Starting dominance 2013-08-20 15:33:32 +0000 [INFO]: [PAL] | Authentication: Authorization error: -2147093999 2013-08-20 15:33:39 +0000 [INFO]: [PAL] | Hallmark: Starting 2013-08-20 15:33:39 +0000 [INFO]: [PAL] | Hallmark: Starting authority 2013-08-twenty 15:33:39 +0000 [INFO]: [PAL] | Authentication: Authorization error: -2147093999 2013-08-20 15:33:42 +0000 [INFO]: Application Pause 2013-08-twenty xv:34:27 +0000 [INFO]: Unique install id | 5FDD3711-9E89-4D8B-B835-88B2C7C51703 2013-08-twenty 15:34:27 +0000 [INFO]: Awarding activated 2013-08-20 15:34:27 +0000 [INFO]: Application resume 2013-08-20 15:34:27 +0000 [INFO]: [PAL] | Authentication: Failed - cookie setup 2013-08-xx xv:34:28 +0000 [INFO]: [PAL] | Authentication: Complete 2013-08-twenty fifteen:34:30 +0000 [INFO]: [PAL] | Hallmark: Starting 2013-08-20 15:34:30 +0000 [INFO]: [PAL] | Authentication: Starting potency 2013-08-20 15:34:thirty +0000 [INFO]: [PAL] | Authentication: Authorization complete 2013-08-20 fifteen:34:30 +0000 [INFO]: [PAL] | Hallmark: Complete 2013-08-20 15:34:31 +0000 [INFO]: [PAL] | Error Messages: one: Master user (Id=d0961fb9-0f09-e311-b8aa-00155d05381a, type=eight) is missing prvReadAccount privilege (Id=886b280c-6396-4d56-a0a3-2c1b0a50ceb0)2: Principal user (Id=d0961fb9-0f09-e311-b8aa-00155d05381a, type=8) is missing prvReadAccount privilege (Id=886b280c-6396-4d56-a0a3-2c1b0a50ceb0)2013-08-20 xv:36:thirty +0000 [INFO]: Application Break                          

See Also