none
Can we do Autodiscover without username and password? RRS feed

  • Question

  • Hi, my client user certificate based authentication. So, actually does not have any information re username and password of the user. My question was that how should I go about requesting for an autodiscover without the username and password? How can I provide the authorization header in the request? 
    • Edited by Ashishks1987 Tuesday, September 30, 2014 2:51 PM
    Monday, September 29, 2014 9:47 PM

Answers

  • Hi Ashishks1987, I believe that the examples in MS-XOAUTH section 4 should provide with you with the information that you need. There are several different scenarios on responding to an HTTP 401 challenge. 4.6 deals specifically with Autodiscovery.

     

    Please let me know if that helps.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Thursday, October 2, 2014 6:42 PM
    Moderator

All replies

  • Hello Ashishks1987,

    Thank you for your question. A member of the protocol documentation will respond to you soon.

    Best regards,
    Matt Weber | Microsoft Open Specifications Team

    Monday, September 29, 2014 10:06 PM
  • Hi Ashishks1987, I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon. Thank you for your patience.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Tuesday, September 30, 2014 5:07 PM
    Moderator
  • Hi Ashishks1987, The Autodiscover request does not require the username or password. Please see MS-OXDSCLI section 6.1 for the Autodiscover request schema. Additional details about the request requirements can be found in section 2.2.3.1.1 and an example can be found in section 4.1.

     

    Please let me know if this answers your question.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Tuesday, September 30, 2014 6:17 PM
    Moderator
  • Hey Josh, actually I am sending the httpclient request with the xml content as shown in the example you just sent. But the thing is, when I remove the Authorization header from the httpclient request, it gives me Unauthorized (401) error code in the response:

    {StatusCode: 401, ReasonPhrase: 'Unauthorized', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
    {
      RequestId: ba8d4df7-c05a-4474-97cf-33ecfd6b1873
      X-DiagInfo: SN2PRD0510CA022
      Cache-Control: private
      Date: Tue, 30 Sep 2014 19:34:32 GMT
      Server: Microsoft-IIS/7.5
      WWW-Authenticate: Basic Realm=""
      X-AspNet-Version: 2.0.50727
      X-Powered-By: ASP.NET
      Content-Length: 0
    }}

    Code sample :

    private readonly HttpClientHandler handler = new HttpClientHandler {AllowAutoRedirect = false};

    var client = new HttpClient(handler);

    HttpResponseMessage responseMessage;
                try
                {
                    responseMessage = await client.PostAsync(discoverUri, requestHttpContent);
                }

    Where, discoverUri is the uri which I am getting the response from (for Autodiscovery) and requestHttpContent has the xml content like :

    <?xml version="1.0"?><Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/requestschema/2006"><Request><EMailAddress>abc@abcd.onmicrosoft.com</EMailAddress><AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006</AcceptableResponseSchema></Request></Autodiscover>



    • Edited by Ashishks1987 Tuesday, September 30, 2014 7:56 PM
    Tuesday, September 30, 2014 7:41 PM
  • Hi Ashishks1987, I believe that the examples in MS-XOAUTH section 4 should provide with you with the information that you need. There are several different scenarios on responding to an HTTP 401 challenge. 4.6 deals specifically with Autodiscovery.

     

    Please let me know if that helps.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Thursday, October 2, 2014 6:42 PM
    Moderator