web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics CRM 2013 SP1 Server Side Sync Issues

(0) ShareShare
ReportReport
Posted on by 230
Hi Everyone

I'm having some issues with Dynamics CRM 2013 SP1 and Server Side Sync,
So where do I begin, since SP1 we have had major issues with Synchronising Appointments, Contacts, Tasks and Emails directly to Mail profiles

Steps taken so far:

- Synchronisations work against some users but not others, not intermittently, so the users affected don't change

- I have assigned system admin security roles to affected users to test synchronisations (unsuccessfully)

- I have checked the mailboxes, all are using the correct email server profile and are set to Server Side Sync for all options

- Retested the mailboxes and all tests are successful

- Checked AD and Exchange Permissions against my User that works (we use impersonation against all Mailboxes) permissions were identical

- This seems to have happened at the same time as a lot of other appointments issues bought on by a modification in error handling by MS, I have not yet tried a stack trace as I have not had the time to go through one.

Any help would be greatly appreciated, ideas, suggestions, straws to clutch at.

Regards
Jay1459

*This post is locked for comments

I have the same question (0)
  • Jay1459 Profile Picture
    230 on at

    Does anyone know which stack trace to use, Async, Web, etc.,

  • Satish Tiwari - CRM Profile Picture
    on at

    As issue is not with all users than I will suggest to look Alerts section for each user under their user mailboxes in CRM to check if there is any error/warning message is available. Also, as you are at SP 1, than you can run tracing for individual mailboxes by following below steps:

    1. Open command prompt on CRM Server

    2. Grab organization id and mailbox id of user from SQL by running select OrganizationId, MailboxId,Name from MailboxBase against Org_MSCRM.

    3. Change the directory to C:\Program Files\Microsoft Dynamics CRM\Server\bin>MailboxAsyncDiag

    e

    usage: MailboxAsyncDiagnosticTool <organization-id> <mailbox-id>

    4. Now, once its completed, navigate to C:\Program Files\Microsoft Dynamics CRM\Trace and open MailboxAsyncDiagnosticTool log file to search for error

    You can also look in SQL for last sync error by running select LastSyncError, Name, * from MailboxBase against Org_mSCRM

  • Jay1459 Profile Picture
    230 on at

    Sorry for this, after 3 hours of testing, it affects all users intermittently,

    Alerts contain no data whatsoever, informational or otherwise.

    and I will try that cmdlet over the weekend and report back, Thanks for the help Satish

  • Jay1459 Profile Picture
    230 on at

    Hi Satish,

    really strange, do I need to enable tracing with the registry to get that cmdlet to work, it runs and puts the mailbox in debug mode and then nothing else.

    checking sql directly after making appointment yields the following error:

    [2014-07-19 17:55:35.844]  |Thread:    6

    >Exception : Unhandled Exception: Microsoft.Crm.Asynchronous.EmailConnector.ExchangeSyncException: Failed to retrieve the sync state : Unhandled Exception: Microsoft.Crm.CrmException: The specified user is either disabled or is not a member of any business unit.

      at Microsoft.Crm.BusinessEntities.SecurityLibrary.CheckDisabledStatus(IUser user, IOrganizationContext context)

      at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetUserInfoInternal(WindowsIdentity identity, IOrganizationContext context, UserAuth& userInfo, LocatorServiceContext locatorServiceContext)

      at Microsoft.Crm.Authentication.CrmWindowsIdentity.DoRecognizeUser(String userToken, Guid organizationId, LocatorServiceContext locatorServiceContext)

      at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId, LocatorServiceContext locatorServiceContext)

      at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId)

      at Microsoft.Crm.Exte...

    appears to truncate at the end however. just to say, the users are enabled and a member of a business unit, the same error occurs across the board for all users when appointments don't sync. finally we have also during this disabled all workflows and JS that fires just to discount those.

  • Jay1459 Profile Picture
    230 on at

    Okay so I have managed to resolve the issue about disabled users, I moved their business unit to the one they are currently in, and then disabled/re-enabled them. this resolved the error shown above, however, we now have a different error...

    ---------------------------------------------------------------------------------------------------------------------------------------------

    [2014-07-21 11:11:05.962]  |Thread:   54
    >Exception : Unhandled Exception: Microsoft.Exchange.WebServices.Data.ServiceValidationException: This operation can't be performed because at least one item already has an ID.

    Server stack trace:
       at Microsoft.Exchange.WebServices.Data.ExchangeService.CreateItems(IEnumerable`1 items, FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode)
       at Microsoft.Crm.Asynchronous.EmailConnector.MonitoredExchangeService.CreateItems(IEnumerable`1 items, FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode, ExchangeItemType exchangeItemType)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg,...

    ---------------------------------------------------------------------------------------------------------------------------------------------

    I believe this is our root error as it appears only when an item fails to synchronise.  has anyone seen it before?

  • Jay1459 Profile Picture
    230 on at

    Update:

    so we found that synchronisations were occurring every 15 minutes and taking 1 hour to complete, since then, we have changed the minimum polling interval to 80 minutes then upon testing again, 15/17 appointments successfully synchronised, the other 2 failed with the duplicate ID Error shown above

    PS. The mailbox diagnostic tool causes the mailbox to error out then logs that error into the logs (meaning you don't get anything other than the error it is causing itself)

    this has been in my experience, if anyone else is getting successful tests if you could let me know.

    im currently testing again to see if the 2 that failed were due to some kind of duplication issue... below is a chart of my findings so far

    Name *Name Here* *Name Here* *Name Here* *Name Here* *Name Here* *Name Here*
    Last Run Time 21-07-2014 14:30:14 21-07-2014 15:51:00 21-07-2014 16:06:41 21-07-2014 17:27:31 21-07-2014 18:05:48 22-07-2014 08:33:36
    Last Error 1 7 8 9 10 15
    Duration 40923 134593 50484 45562 45562 45562
    Items Processed 688 618 374 219 192 180
    Next Run Time 21-07-2014 15:50:13 21-07-2014 17:10:26 21-07-2014 17:26:41 21-07-2014 18:46:41 21-07-2014 19:25:48 22-07-2014 09:53:36

    as you can see, sometimes the Last run time is sooner than the previous next run time, which is confusing, unless it was still synchronising from before I changed the minimum polling time.

    Finally: I still don't know the root cause due to those 2 appointments failing, but I am going to strongly suggest that if 2 synchronisation jobs run concurrently there are errors surrounding duplication.

    hope this helps and if someone could confirm this I would be immensely grateful.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans