I am trying to get content from SharePoint using URLs such as:


But while invoking this URL from Java, I am getting HTTP 401 - Authentication Required Error.

I also do have username & password for SharePoint with me. Is there any way I can use username/password details in URL to authenticate with SharePoint?


1 Answer 1


SharePoint supports Basic HTTP authentication. The issue is that certain modern browsers don't support the specified URL format for security reasons (admittedly I have only confirmed this with IE so any input on other browsers would be useful).

See Internet Explorer does not support user names and passwords in Web site addresses (HTTP or HTTPS URLs) for more info on IE specifically.

The complexity of your problem really depends on:

Whether multiple authentication providers / user stores are in play and, Location of users (i.e. internal/domain or external) If everyone is internal and authenticated against the same user directory (e.g. AD), then you can just use Windows authentication and benefit from a form of "single sign on".

If everyone has an internal domain account but is accessing the system from outside the network, you can use a reverse proxy server (such as ISA server or TMG) to provide a "SSO" cookie that allows cross-site access from a forms based login (again this assumes all apps use the same user directory). Both of these reverse proxy servers can delegate Basic authentication if required.

If however your applications maintain separate user directories, some form of credential caching may be necessary in order to provide "SSO", as others have suggested.

In all cases, if you are using Basic auth you should make certain that you secure the channel using SSL as credentials are not encrypted.

  • Thanks, Using IE, i can leverage Windows Authentication but before accessing the content, i am trying to verify whether the content exists in sharepoint or not and for same i am trying to access content and for HTTP 200 response, i am assuming that it is still there. Refer to stackoverflow.com/questions/25000055/… for code details.
    – Finn
    Jul 29, 2014 at 4:43
  • Can i use Sharepoint WSDL for my purpose.
    – Finn
    Jul 29, 2014 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.