[E2010] [EWS Java API 1.1][JAVA] - How can I use Form Based Authentication with EWS? RRS feed

  • Question

  • Hi,

    Can we use Form Based Authentication with EWS Java API? If it is possible, could you please provide some sample code for the same?

    If it is not directly supported with EWS API, could anyone point me how to do it?



    Friday, October 28, 2011 7:32 AM

All replies

  • Why do you want to do this? The WebServices are only ever consumed by applications, so form-based authentication makes little sense.

    What is your use case?
     Kind regards,

    If you get your question answered, please come back and mark the reply as an answer.
    If you are helped by an answer to someone else's question, please mark it as helpful.

    Friday, October 28, 2011 10:39 AM
  • I agree with Henning. If your app is presenting the user with a form, then that app can get the user name and password from the form and use that to fuel basic auth.
    Saturday, October 29, 2011 1:04 AM
  • Please correct me, if I am wrong.

    Form Based Authentication, Basic Authentication etc. is a setting in the Exchange Server for client access.

    In the exchange server, if the authentication mode selected is Basic Authentication, then it is fine, I can use the EWS's web credential. The EWS is taking care of sending the user name and password as an HTTP Header in the request.


    But if the authentication mode selected in the server is Form Based Authentication, then sending the credentials in the HTTP header is not sufficient, It will look for the cookies in the request to authenticate the user.


    As an exchange client, I want to support both authentication modes.

    Thursday, November 10, 2011 1:49 PM