The remote server returned an error 407 Proxy Authentication Required error SharePoint Online Visual Studio

This SharePoint tutorial explains how to solve the remote server returned an error (407) proxy authentication required. SharePoint error which comes while working in SharePoint Online using visual studio.

Recently we were working in a console application using visual studio 2015 and we were doing some list operations in our SharePoint online site. But while running the code we got the below exception in the ExecuteQuery method which says:

An unhandled exception of type ‘System.Net.WebException’ occurred in Systme.dll.

Additional information: The remote server returned an error: (407) Proxy Authentication Required. The full error looks like below:

The remote server returned an error 407 Proxy Authentication Required
The remote server returned an error 407 Proxy Authentication Required

The code was correct and we were able to run in another machine.

the remote server returned an error (407) proxy authentication required. SharePoint

To resolve the issue we have changed the proxy settings like below:

Go to internet options in IE and click on Connections tab -> LAN settings. And here do the below things.

  • Check Automatically detect settings
  • Uncheck Use automatic configuration script
  • Uncheck Use a proxy server for your LAN (These settings will not apply to dial-up or VPN connections).

Refer fig below:

The remote server returned an error 407 Proxy Authentication Required SharePoint
SharePoint The remote server returned an error 407 Proxy Authentication Required

Read some SharePoint CSOM examples:

Once we had done the above changes, we did not receive any error related to “The remote server returned an error 407 Proxy Authentication Required”.

>