Search code examples
c#visual-studiooffice365office-jsoffice-addins

Outlook Add-In unable to debug due to error connecting exchange email account


When I go to run the project in VS, at the point where I am prompted to log in to my Office account, I enter my credentials and get:

An error occurred while connecting to the server: 

   The request failed. Unable to connect to the remote server

I had started making this outlook.com add-in a few months ago and it was working. Now, coming back to it after a few months, I have not changed anything so I am puzzled as to why I am getting this issue.

I followed this tutorial from Microsoft itself.

Edit:

Here are some screenshots:

Start

When I click Start, the following pop-up shows up. I have double checked my credentials.

Popup

If I click on Connect, it will load for a while before the following error shows up:

Error

Hopes this helps.


Solution

  • In the properties window of the manifest node you need to set the Use multi-factor auth property to true.

    enter image description here