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.

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.

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:
Bijay Kumar Sahoo is a highly accomplished professional with over 15 years of experience in the field of SharePoint and related technologies. He has been recognized as a Microsoft MVP (Most Valuable Professional) more than 9 times, starting from April 2014, for his exceptional contributions to the SharePoint community. Bijay is also a prolific author, having written two books on SharePoint – “Microsoft Power Platform – A Deep Dive” and “SharePoint Online Modern Experience Practical Guide“. His deep insights into SharePoint are also shared on his popular YouTube channel EnjoySharePoint where he teaches SharePoint to a global audience (From various countries like the United States of America, Canada, the United Kingdom, Australia, New Zealand, etc). Read more…