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 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:

Read some SharePoint CSOM examples:
- SharePoint 2016 CSOM Check if Column Exists or Not in SharePoint List
- Upload large files to SharePoint online document library using PowerShell csom
- Steps to add items from CSV file to SharePoint Online List using PowerShell in CSOM
- Copy SharePoint list items to another list programmatically using CSOM in SharePoint Online/2013/2016
- Another site or list is still using this content type. If you would still like to delete it please remove the content type from all sites and lists and then try again
- Create a list from list template in SharePoint Online 2013 programmatically
- CAML Query for SharePoint Boolean Field using SharePoint Online Client Object Model (CSOM)
- SharePoint Online: Create an indexed column in a list Programmatically using CSOM .Net managed object model code using visual studio 2017/2015
- You cannot change moderation status and set other item properties at that same time SharePoint online csom
- [Solved] the request message is too big. the server does not allow messages larger than 2097152 bytes in SharePoint online visual studio 2015/2017 workflow
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”.
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”