https://login.veeam.com/en/oauth?client_id=nXojRrypJ8&redirect_uri=https%3A%2F%2Fwww.veeam.com%2Fservices%2Fauthentication%2Fredirect_url&response_type=code&scope=profile&state=eyJmaW5hbFJlZGlyZWN0TG9jYXRpb24iOiJodHRwczovL3d3dy52ZWVhbS5jb20va2IyNzE0IiwiaGFzaCI6IjdiODZkYzc0LTMwMzUtNGZjOS05MmM4LTNlMmNlNDk0YWUzOSJ9
1-800-691-1991 | 9am - 8pm ET
EN

“Unauthorized” error is thrown by SharePoint Online and/or OneDrive for business backup jobs

Challenge

Backup jobs for SharePoint Online and/or OneDrive items fail with any of the following errors:
07-08-2018 11:11:39 3 (6640) Error: The request failed with HTTP status 401: Unauthorized. 
07-08-2018 11:11:39 3 (6640) Type: System.Net.WebException 
07-08-2018 11:11:39 3 (6640) Stack: 
07-08-2018 11:11:39 3 (6640) at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
User-added image
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."

Cause

Legacy authentication protocols are disabled within Organization’s settings. As a result, applications using the SharePointOnlineCredentials class to authenticate the SharePoint Online resources are denied to access. Veeam Backup for Microsoft Office 365 uses the above-mentioned class to connect to SharePoint Online.

Solution

To resolve the issue, legacy protocols must be allowed. There are 2 ways to enable legacy protocols:
  1. In SharePoint Online admin center under “Access control” -> “Apps that don’t use modern authentication”, choose “Allow”
  2. Use Set-SPOTenant cmdlet as in this Microsoft article.
KB ID:
2714
Product:
Veeam Backup for Microsoft Office 365
Version:
ALL
Published:
2018-08-26
Last Modified:
2020-08-13
Please rate how helpful this article was to you:
5 out of 5 based on 1 ratings
Thank you for helping us improve!
An error occurred during voting. Please try again later.

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.
Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Spelling error in text

Knowledge base content request
By submitting, you agree that your personal data will be managed by Veeam in accordance with the Privacy Policy.
Your report was sent to the responsible team. Our representative will contact you by email you provided.
We're working on it please try again later