Error: “Unauthorized” when doing backup of SharePoint Online and/or OneDrive


Challenge

Doing backup of SharePoint Online and/or Onedrive results in the following error:

'Error: The request failed with HTTP status 401: Unauthorized.’

Or

‘Error: Cannot contact web site 'https://example.sharepoint.com/' or the web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'. The response headers are 'X-SharePointHealthScore=1, X-MSDAVEXT_Error=917656; Access+denied.+Before+opening+files+in+this+location%2c+you+must+first+browse+to+the+web+site+and+select+the+option+to+login+automatically."'

Solution

Allow legacy protocols. This can by using one of the two solutions:

  1. In SharePoint Online admin center, under "Acces control” - “Apps that don´t use modern authentication”, select “Allow”
  2. Use the following cmdlet in this Microsoft article.

Cause

Legacy protocols are disabled within the tenants Microsoft 365 settings. The SharePointOnlineCredentials class is used by ReVirt 365 to authenticate SharePoint Online resources and are denied access.


Read more about what our services can do for you

Backup of Microsoft 365

Back-up-as-a-Service

Disaster-Recovery-as-a-Service

Veeam Object Storage


Was this article helpful?