How to collect Microsoft Exchange ActiveSync logs to troubleshoot issues with Microsoft Exchange

Article ID: KB33722

Type: Support Content

Last Modified: 06-29-2015


Product(s) Affected:

  • BlackBerry 10 OS
  • BES10
  • BlackBerry PlayBook tablets
  • BlackBerry Device Service
  • BlackBerry 10 smartphones
  • BlackBerry PlayBook tablet
  • BlackBerry Enterprise Service 10  
  • BlackBerry Device Service
  • Microsoft Exchange Server
  • Microsoft Exchange ActiveSync
  • Microsoft Office 365

For Microsoft Exchange 2007 - 2013:

The following steps explain how to use Outlook Web App to collect Microsoft Exchange ActiveSync logs to troubleshoot sync issues between mobile devices (including BlackBerry 10 smartphones and BlackBerry PlayBook tablets) and Exchange:

  1. Sign in to the Outlook Web App (Log in as an Administrator to collect logs for others).
  2. In the upper-right area of the page, click Options, and then See All Options.
  3. In the upper-left area of the page under Options.
    • For Adminstrators:
      1. Select Manage Myself in the drop-down list under Select what to manage, click Another User...
      2. Select the User, and click OK. A new browser window will open.
    • For Users proceed to step 4.
  4. In the navigation pane on the left, click Phone.
  5. In the list of devices, select the device to track and then click Start Logging.
  6. In the Information dialog box, click Yes.
  7. Reproduce the behavior to be captured in the logs, and then click Retrieve Log.
  8. An email message that contains the log file (EASMailboxLog.txt) as an attachment is sent to the users mailbox.

The EASMailboxLog.txt file is in XML format and is readable using a text editor such as Notepad, TextPad, or NotePad++.

Using Exchange PowerShell:

The following steps explain how an Exchange Administrator can enable/disable Microsoft Exchange Activesync Logging and collection of the logs via Powershell so that the end user need not be involved:

  1. To start logging use the Powershell cmdlet:
    • Set-CasMailbox –ActiveSyncDebugLogging $true –Identity <userMailbox>
  2.  To disabling logging, use the Powershell cmdlet:
    • Set-CasMailbox –ActiveSyncDebugLogging $false –Identity <userMailbox>
  3.  Retrieval of the logs manually can be performed using the Powershell cmdlet:
    • Get-ActiveSyncDeviceStatistics –mailbox <userMailbox> -GetMailboxLog:$true –NotificationEmailAddress <userEmail>

CAS Exchange Activesync logging can also be extended since by default the logs will have truncated tags. The data for most tags is removed and replaced with a tag attribute indicating how many bytes the data contains. For example the subject of an email may look like this:

<Subject xmlns="Email:" bytes="19"/>

 ...instead of this:

<Subject xmlns="Email:">This is the subject</Subject>

If the actual data is required, then enable verbose logging on each CAS the request may hit. To do so, open the x:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Sync\web.config file, and find this tag:

<add key="EnableMailboxLoggingVerboseMode" value="false "></add>

Change that value to true. Note that this setting is per-CAS, so the verbosity will be dependent on which CAS the device is communicating with. No restart is required of IIS or the application pool.

Note: Microsoft Exchange 2013 deprecated Get-ActiveSyncDeviceStatistics in favor of Get-MobileDeviceStatistics so corresponding changes would need to be made to powershell commands for Exchange 2013.

For Microsoft Office 365 (currently by the end user login only):

  1. Sign in to the Outlook Web App
  2. In the upper-right area of the page, Settings (gear Icon) - > click Options - > Click Other - >Go to Earlier version -> Click Phone -> Highlight the device -> Click on the Button to Start logging(page with small triangle)
  3. Reproduce the behavior to be captured in the logs, and then click Retrieve Log .
  4. An email message that contains the log file (EASMailboxLog.txt ) as an attachment is sent to the users mailbox.

If Powershell is being used for Microsoft Office 365 log then the following commands would need to be run to access Microsoft Office 365 servers:

  1. Import-Module MSOnline
  2. $Cred = Get-Credential
  3. Connect-MsolService -Credential $Cred
  4. $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $Cred -Authentication Basic –AllowRedirection
  5. Import-PSSession $s
  6. $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $Cred -Authentication Basic –AllowRedirection
  7. Import-PSSession $s

For other versions of Microsoft Exchange:

The logs should be located at C:\inetpub\logs\Logfiles\W3SVC1. If not it may be required to search for the folder W3SVC1.

BlackBerry 10 smartphone logs:

In addition to collecting Microsoft Exchange ActiveSync logs, it is imperative that the device logs are also collected. See KB26038 on how to obtains logs from the BlackBerry 10 smartphone.

BlackBerry 10 OS logging has increased in detail significantly over BlackBerry PlayBook OS. Given this change, the time frame captured is much smaller. In order to properly capture the customers issue, logs should be collected immediately after reproducing the issue. If the user has stated that the issue is not reproducible on command, pend the ticket and provide direction to the customer as to how to submit to an open ticket at a later time.

CollapseAdditional Information


By downloading, accessing or otherwise using the Knowledge Base documents you agree:

   (a) that the terms of use for the documents found at apply to your use or reference to these documents; and

   (b) not to copy, distribute, disclose or reproduce, in full or in part any of the documents without the express written consent of RIM.

Visit the BlackBerry Technical Solution Center at