Connections to the SharePoint server are currently disabled because the project is in Offline mode

In this SharePoint tutorial, we will discuss, how to fix the error, Connections to the SharePoint server are currently disabled because the project is in Offline mode.

Connections to the SharePoint server are currently disabled because the project is in Offline mode

The above error comes when I was working on the SharePoint client object model using visual studio. I got it while working with a SharePoint-hosted add-in using Visual Studio.

In the add-in, I was using the jsom code to get data from a SharePoint Online list.

When I run the project it gave me the error as:

Connections to the SharePoint server are currently disabled because the project is in Offline mode. To connect to the SharePoint server, switch to Online mode by setting the project’s server connection property to Online, and then try the operation again.

Connections to the SharePoint server are currently disabled because the project is in Offline mode
Connections to the SharePoint server are currently disabled because the project is in Offline mode

Solution

The error, I got was because the solution was offline. To fix the issue follow the below step:

  • Open the solution using Visual Studio, Select the project -> Click F4. This will open the properties details.
  • On the Properties, go to Server Connection and Choose Online.
Connections to the SharePoint server are currently disabled
Connections to the SharePoint server are currently disabled

Then it will ask you to enter the Microsoft 365 credentials and it will run as expected.

This is how we can solve the error, Connections to the SharePoint server are currently disabled because the project is in Offline mode.

You may also like: