ActiveSync - Mapping a Collection ID to a Mailbox Folder
Whenever you troubleshoot an ActiveSync issue, the logs do not provide the actual folder name that is being processed. Instead you will see CollectionID in the ActiveSync mailbox log and Fid in the IIS logs.
In most cases you will not capture the initial FolderSync request that includes the response where these folders are added to the device. This FolderSync response will provide the name of the folder and corresponding CollectionId value.
So how do you determine which folder the device is attempting a request against if all you have is a numeric ID. The answer is using a tool like MfcMapi to open the mailbox and locate these hidden folders. The following steps show how to use MfcMapi to accomplish this task:
1. Open MfcMapi
2. Go to the Session menu and Logon to the Outlook profile for the mailbox
5. Here you will find a list of associated ActiveSync devices for this mailbox. Expand the device experiencing the issue and you will see containers for each CollectionId
6. Select the CollectionId number you identified in the ActiveSync log (The CollectionID of 2 will be used in this example) and highlight the property 0x7C030102
7. Go to the Property menu, select Selected property, and select Open as entry ID or object
8. Modify the selected value by removing the first and last bytes. Example: 2E00000000757F911EB748EA45B7F28E4A640430C601006209883B90F0E246B480218E131EAA1E000000000010000003
9. The folder associated with the ID should open and in this example it is the Contacts folder
Now when you troubleshoot and ActiveSync issue can begin searching/parsing the logs for a specific CollectionID value which should improve your efficiency. It is also important to note that when you are parsing the IIS logs the request includes the type of folder being synchronized. Most mailboxes only have a single Calendar and Contacts folder which would allow you to use this type element to quickly determine the CollectionId/Fid value. Here is an example where Fid:2 is of type Contacts:
Update 12/4/2013 - Glen wrote a Powershell script using the EWS API to retrieve this information for all devices associated with a mailbox. Check out his blog to download the script and get this information even quicker.