(407) Proxy Authentication Required.

Mar 20, 2013 at 9:27 AM

I am trying to connect my SharePoint office 365 site. For this I selected Office365 credential option, entered username and password. Then in Destination tab I entered Office 365 url. Now whenever I try to click on "Load" in destination tab I am getting following error

SiteAndListTreeLoader:Exception:The remote server returned an error: (407) Proxy Authentication Required.

I entered following information
URL - https://avisp2013.sharepoint.com
username - avi99@aviSP2013.onmicrosoft.com password - ********

Please let me know I am missing any steps.
Mar 21, 2013 at 1:10 PM
I assume that you are trying to connect to the site via a proxy server.

The proxy server is likely the cause of the problem and the fact that DIFS does not authorise via a proxy very well.

Either use a direct connection.

You might be able to get it working by modifying difs.exe.config with your authentication settings.

<configuration> <system.net> <defaultProxy enabled="true" useDefaultCredentials="true"> <proxy bypassonlocal="True" proxyaddress="http://100.100.300.200:8080" /> </defaultProxy> </system.net></configuration>

Let me know if you have any success with this since DIFS has not been tested with a proxy server to date and it would be interesting to here peoples experience of it.
Apr 4, 2013 at 6:31 AM
I modify the project and made the changes in MSOnlineClaimHelper.cs and add the following lines and now the application is working with proxy as well.

System.Net.NetworkCredential ReqCredential = new NetworkCredential("username1", "password@123","domainname"); System.Net.WebProxy ReqProxy = new System.Net.WebProxy("proxy1.domain.com:8080", false);
ReqProxy.Credentials = ReqCredential;
WebRequest.DefaultWebProxy = ReqProxy

I added above lines after
trustClient.ClientCredentials.UserName.Password = _password;

Once thing I am trying to understand that How can I detect that user running the application via proxy server or not, Please advise.


Apr 4, 2013 at 1:22 PM
Good that it works.

I am not sure that there is a way to reliably detect Proxy server presence. I would think it better to allow the user to specify.