Category Archives: Server-Side Sync

Using “EWS Editor” to fix “Dynamics 365 App for Outlook” issues

This article describes how to use the EWS Editor for Dynamics 365 utility to resolve Dynamics 365 App for Outlook issues. This post is a continuation of my previous article where I listed several checks to fix deployment issues with the Dynamics Outlook App.

EWS Editor was originally created to demonstrate the capabilities of the Exchange Web Services API. EWS Editor for Dynamics 365 is based on that one to provide additional utilities and troubleshoot issues related to Server-Side Synchronization and the E-mail Router.

Because the Dynamics 365 App for Outlook relies on the Server-Side Synchronization, this utility becomes also useful to resolve issues with the Dynamics Outlook App. In our case, we were getting the following error:

ExchangeError:UnknownIncomingEmailIntegrationError

This happened to us when we enabled the Dynamics Outlook App in a different organisation. So the app for this user was first enabled in organisation A, then we needed to deactivate it in this org and add it in organisation B, but we started to get that error and we couldn’t deploy it in org B and it also stopped working in org A 😦 .

The following steps describe how we use this tool to finally fix the problem:

Step 1 – Download EWS Editor for Dynamics 365

Step 2 – Launch “EWSEditorForDynamics365.exe”

Step 3 – Connect to Exchange Service

ramontebar_blog_EWSEditor_Exchange Connection

ramontebar_blog_EWSEditor_Exchange Connection Authentication.png

Step 4 – Add Mailbox Root

ramontebar_blog_EWSEditor_Mailbox root dialog

ramontebar_blog_EWSEditor_Mailbox root folders

Step 5 – Connect to Dynamics 365 Service

ramontebar_blog_EWSEditor_Connect to Dynamics 365 Service

Step 6 – Open All Items

Expand MsgFolderRoot and select Allitems by double clicking it.

Step 7 – Show To-Be Tracked Items

Navigate to View => Filter View Items => Show To-Be Tracked Items

ramontebar_blog_EWSEditor_Show To-Be Track Items

Step 8 – Check that crmLinkState is set to 1

Exchange Items (email, tasks, contacts, appointments) that have been tracked in Dynamics will have some additional properties to define the link between the systems. One of those properties is crmLinkState, which should have one of these values:

0 – Item is not tracked

1 – Item To-Be tracked

2 – Item has been tracked

ramontebar_blog_EWSEditor_crmLinkState

Step 9 – Hard Delete* all items to be tracked (pending tracking) where crmLinkState is 1

Right click on each item and navigate to Delete Item => Hard Delete

ramontebar_blog_EWSEditor_Hard Delete.png

*Please notice you may lose important information, so make sure you are ok deleting those emails or other items.

Step 10 (END!) – Enable the Mailbox again

  1. Now navigate to your Dynamics instance.
  2. Open the User mailbox and click on “Test and Enable Mailbox”.
  3. Check the Box “Sync items with exchange
  4. Wait till you receive the “Success” message for both emails and appointments.
  5. Once you receive the Success message, deploy/add the app again.
  6. This should resolve the issue.

If you want to learn more about the EWS Editor, check the following URL:

https://blogs.msdn.microsoft.com/mstehle/tag/EWSEditor/

**Credits: Thanks to my colleague Narendra for helping me to put this content together.

Advertisements

Fixing Dynamics Outlook App deployment issues

This article describes several options to resolve issues when deploying the new Dynamics 365 Outlook App but the user cannot see the Dynamics add-in in his/her Outlook.

ramontebar_blog_Dynamics Outlook App Button

One of the most challenging errors that we have found so far was this one:

ExchangeError:UnknownIncomingEmailIntegrationError

See below more details regarding the same, but before that, I’ll first cover the simple checks you can do and then move into the most complex one. Please try to follow the same order.

Check 1: Deployment Status

Our stating point is the Dynamics 365 App for Outlook administration section within Settings. You have probably already added the App from there. Check now the Status, that will give you some useful information:

ramontebar_blog_Add Dynamics 365 App for Outlook in Settings - Deployment Status

If the Status is Pending, remember it may take up to 15 minutes to be deployed.

If there was a deployment issue, you would get a red message with some error information.

Re-add the app for the failing user, that should fix the issue. Otherwise, carry on with the next check.

Check 2: Basic configuration

The first thing you may have already looked at is this Microsoft Dynamics 365 App for Outlook Deployment guide . I won’t repeat what is in there, but basically you want to review these points carefully again:

  • Does the user got the right Security Role and required privileges?
  • Has the user mailbox been configured correctly?
    • Server-Side Synchronization should be enabled (Outgoing Email not required)
  • Has the user mailbox “Test & Enable” successfully? You should see the “Success” status as below.

ramontebar_blog_User Mailbox

Even if you think you have already done those correctly, review and run them again, sometimes it will just work.

Check 3: User Mailbox Alerts

The new Dynamics Outlook App relies on Server-Side Sync (SSS) to track the corresponding records. This is the reason why the Mailbox Alerts become very important and many times the error messages in there may give you the clue to fix the problem.

ramontebar_blog_Dynamics User Mailbox Alerts

Click on “Test & Enable Mailbox” again and confirm you are getting the same Mailbox Alerts. Otherwise, it may actually sort out the issue.

Check 4: Manage Outlook Add-ins

In your Outlook desktop application, you will find a Manage Add-ins when you click on File in the main menu:

ramontebar_blog_Manage Outlook Add-ins

This “Manage Add-ins” button will take you to the following URL which allows you to manage the Web Add-ins for Outlook:

https://outlook.office.com/owa/?path=/options/manageapps

In there you will be able to confirm what is the Dynamics organisation where the Outlook App is pointing to and its version number. Make sure it is what you were expecting and it is not pointing to a different environment.

In this portal, you can also Uninstall the Dynamics App using the “-” button, see the following screenshot:

ramontebar_blog_Manage Web Outlook Add-ins

Try to uninstall the app and then add it again as we saw in the Check 1.

Check 5: Delete all emails from draft and deleted folder

  1. Close all open emails in Outlook.
  2. Delete all Draft emails by navigating to draft folder.
  3. Delete all emails from Deleted items folder.
  4. Now navigate to your Dynamics instance.
  5. Open the User mailbox and click on “Test and Enable Mailbox”.
  6. Check the Box “Sync items with exchange
  7. Wait till you receive the “Success” message for both emails and appointments (if you enabled both).
  8.  Once you receive the Success message, deploy/add the App again for the corresponding user.
  9. This should resolve the issue.

Check 6: “Approve Email” by Global 365 Administrator

Initially, this “Approve Email” is only required for sending emails out, which is not a requisite for enabling the Dynamics Outlook App. However, we have noticed this can also help in some cases. Please follow these steps:

  1. Open the User mailbox.
  2. Check if the below message is displayed on the mailbox: “Email won’t be processed for this mailbox until the email address of the mailbox is approved by an Office 365 administrator…
  3. If yes, Ask Office 365 Administrator to Approve the email processing by clicking on “Approve email” button.
  4. Once this is approved by office 365 Administrator then Open the User mailbox and click on “Test and Enable Mailbox”.
  5. Check the box “Sync items with exchange
  6. Wait till you receive the “Success” message for both emails and appointments.
  7.  Once you receive the Success message, deploy/add the app again.
  8. This should resolve the issue.

Check 7: Accept conflicts from Mailbox

  1. Go back to the User mailbox and navigate to Alerts.
  2. Delete all alerts by clicking on Delete button.
  3. Check if there are any Scheduling conflicts exists.
  4. If Yes, accept them (click Yes) one by one.
  5. Now click on “Test and Enable Mailbox”.
  6. Check the Box “Sync items with exchange
  7. Wait till you receive the “Success” message for both emails and appointments.
  8.  Once you receive the Success message, deploy/add the app again.
  9. This should resolve the issue.

ramontebar_blog_Dynamics Outlook App_Mailbox Alert_Scheduling conflict

Check 8: Use “EWS Editor For Dynamics 365” tool

This utility allows you to retrieve Microsoft Exchange emails and inspect their Dynamics 365 properties (e.g. crmid, crmLinkState) for those emails that have been tracked.

You can find this utility here:

https://github.com/DJB9k/EWS-Editor-for-D365

This utility was the one that helped us to resolve the issue ExchangeError:UnknownIncomingEmailIntegrationError.

Since you should be already bored of reading this article 🙂 , I’ll give you a break and I’ll show you more things about this tool in my next post that I’ll publish very soon.

**Credits: Thanks to my colleague Narendra for helping me to put this content together.