How to solve Microsoft Office Add-in authentication error in Dynamics 365 for Operations

However I’m currently extremely busy on several projects and also preparing some speaker sessions for a local Dynamics community and also the Summit EMEA 2017, I would like to share a solution to solve an authentication error when using the Microsoft Office Add-in. You will probably not face this issue when you are using machines in your own domain.

The problem

Using my own laptop accessing a test environment of a customer I wanted to Open the customers in Excel. In Dynamics 365 for Operations you can click the Office button to Export data or Open data in Excel. What is the difference between Export and Open here? Well, Export will create an Excel file with static data where Open will create an Excel file with embedded Office add-on to be able to refresh and also publish data back to Dynamics 365.

During login an Authentication error occurs for me when accessing this customer sandbox environment from my work laptop.

Looking at some error details the next error is raised:

AADSTS50058: A silent sign-in request was sent but no user is signed in. The cookies used to represent the user’s session were not sent in the request to Azure AD. This can happen if the user is using Internet Explorer or Edge, and the web app sending the silent sign-in request is in different IE security zone than the Azure AD endpoint (login.microsoftonline.com). Trace ID: ae185b5c-b397-4b49-b3d1-790e1c9a67aa Correlation ID: 04007e36-a31d-4968-92c5-3fe70bfa5f59

In simple words: My laptop is not part of the domain of the customer. When trying to login, you will then continuously notice the attempts fails. Again and again and again…

The solution

When you click the User menu, you will get a menu with the option to Sign out.

When you sign out, the next form will then be presented. Usually you will close a browser, but in this case, the login page is embedded in the Excel add-on. The User menu is not visible and at first sight, there is no option to continue. So we are a bit confused now…

When you click the form space a small menu icon will be presented which can  be used to open a Microsoft Dynamics menu. Then click Reload. You can also right click on the white space to get a pop-up menu with the option for reloading the page. The step to really sign out can be avoided. If you are able to open the Microsoft Dynamics menu, you just have to Reload the page to get rid of the silent sign-in attempt.

When the page is reloaded, you can sign-in with the required login credentials.

When you have provided the correct credentials, you can continue using the Excel add-on.

That’s all for now. Till next time!

8 replies
    • André Arnaud de Calavon
      André Arnaud de Calavon says:

      Hi Kevin,

      This error can come back at another moment. In that case, just follow the same procedure again.

      Reply
  1. Themba Mayaba
    Themba Mayaba says:

    What security rights are required to use the open in excel function, normal users get read/write errors when opening and trying to publish data back into Excel

    Reply
    • André Arnaud de Calavon
      André Arnaud de Calavon says:

      Hi Themba,

      Apologies for the late reply. Data entity access is managed using privileges containing the entity and set a certain access level.

      Reply
  2. Ramon bazan
    Ramon bazan says:

    Thank you for the clear solution steps. Unfortunately this did not fix my issue.

    I have tried installing all Excel updates, restarting computer, singing off and back on into Excel Account. Setting Role to System Adminstrator in Dynamics, opening the add on from the “Open in Excel” in Dynamics and on an empty excel sheet via Insert ->Add in. I have tried on multiple different servers and of course, I have tried the steps in this article multiple times.

    Any advice on what to check next?
    Thank you

    Reply
    • André Arnaud de Calavon
      André Arnaud de Calavon says:

      Hi Ramon,

      You can try to contact Microsoft Support or create a question on the Dynamics community or another forum. Then you can also provide more information and possibly add screenshots to illustrate your issue.

      Reply
    • Quynh
      Quynh says:

      Hi Ramon,
      My customer have the similar error and I have provided the same solution to him but it did not work.
      I also tell him to clear the cookies from Brower (he uses Internet Explorer and Google Chrome).
      Did you have the solution for yourself?
      I am finding it too, please let me know the solution if you have it.

      Reply
    • Tommy Skaue
      Tommy Skaue says:

      When you see the dialog that asks you to authenticate, don’t select your user in the list if it is there, but select “other user” where you are forced to type in username and then password manually.

      Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.