Error Message: Object Reference not set to an instance of an object.

SharePoint - Error Message: Object Reference not set to an instance of an object.

Action:
We started getting an error from a component which copies a file to an Office 365 SharePoint site. This upload has been working fine for months and no deployments have been made to it. The error is happening both on the deployed version and when run locally in Visual Studio. We've recreated the issue on several SharePoint sites, using several different sets of credentials. When we go into the SharePoint Connection Manager and hit Test Connection, we get the following error message.
Error Message:
'Object Reference not set to an instance of an object '
Solution:

Two possible solutions:

1. After COZYROC assessed customer Fiddler Trace files against a SharePoint server that was not failing and 2nd trace file against Sharepoint server that was failing, customer was urged to contact Microsoft with problem on Sharepoint side, not COZYROC SharePoint connection.  Customer reported the following feedback:

Was a problem in Office 365, as per your assessment.


Just FYI, Microsoft helped fixing the problem in the environment. It turned to be an Office 365 setting that had been wrongly applied.

According to Microsoft, someone would have had to run a PowerShell command to change this tenant setting  LegacyAuthProtocolsEnabled to False.

 

Reference here: https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps


2. It is possible your user account has enabled Multi-Factor Authentication(MFA) and this is the reason for the error.
In version 2.0 COZYROC release a way of connecting with MFA enabled SharePoint service.  Please see this KB article: 


    Book a Presales Call

     

    Are you new to COZYROC and evaluating our solutions? 
    Book a Presales Call with us now.