none
[Autodiscover][POX]In the same ENV, my test code can't get EXHTTP protocol tag but outlook "Test E-mail Autoconfiguration" can. RRS feed

  • Question

  • Hi,

    I get a test code from the url(https://code.msdn.microsoft.com/exchange/Exchange-2013-Get-user-7e22c86e) which can get the user setting with Autodiscover.

    And I use POX service to request the information(In the code, set the arguments.UseSoapAutodiscover false).

    From the article(http://msdn.microsoft.com/en-us/library/bb204189(v=exchg.150).aspx), I found through adding Request Header with key-value("X-ClientCanHandle","ExHttpInfo") it should get the EXHTTP protocol. But after changing the code it can't work.

    I also use outlook "Test E-mail Autoconfiguration" tool. It can get the EXHTTP protocol.

    Do I miss other settings?


    In function "TryPoxAutodiscoverUrlafter line(poxRequest.ContentType = "text/xml";) I insert some code as below:

    poxRequest.Headers.Add("X-ClientCanHandle", "ExHttpInfo");


    The results from the test code and outlook are below:

    from the test code:

    <?xml version="1.0" encoding="utf-16"?>
    <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
      <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
        <User>
          <DisplayName>xi la</DisplayName>
          <LegacyDN>/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=090fbaff861f4e0ebf4929476e0e94fe-xi la</LegacyDN>
          <AutoDiscoverSMTPAddress>xila@linha05-ex20131.com</AutoDiscoverSMTPAddress>
          <DeploymentId>4ab28253-d565-4169-97fb-86fb335d11a9</DeploymentId>
        </User>
        <Account>
          <AccountType>email</AccountType>
          <Action>settings</Action>
          <MicrosoftOnline>False</MicrosoftOnline>
          <Protocol>
            <Type>EXCH</Type>
            <Server>eec1c713-b3b0-4430-a201-36ec36c2c0de@linha05-ex20131.com</Server>
            <ServerDN>/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=eec1c713-b3b0-4430-a201-36ec36c2c0de@linha05-ex20131.com</ServerDN>
            <ServerVersion>73C08391</ServerVersion>
            <MdbDN>/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=eec1c713-b3b0-4430-a201-36ec36c2c0de@linha05-ex20131.com/cn=Microsoft Private MDB</MdbDN>
            <PublicFolderServer>linha05-m-cas10.linha05-ex20131.com</PublicFolderServer>
            <AD>LINHA05-AD2010.LINHA05-EX20131.com</AD>
            <ASUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</ASUrl>
            <EwsUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</EwsUrl>
            <EmwsUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</EmwsUrl>
            <EcpUrl>https://linha05-m-cas10.linha05-ex20131.com/ecp/</EcpUrl>
            <EcpUrl-um>?rfr=olk&amp;p=customize/voicemail.aspx&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-um>
            <EcpUrl-aggr>?rfr=olk&amp;p=personalsettings/EmailSubscriptions.slab&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-aggr>
            <EcpUrl-mt>PersonalSettings/DeliveryReport.aspx?rfr=olk&amp;exsvurl=1&amp;IsOWA=&lt;IsOWA&gt;&amp;MsgID=&lt;MsgID&gt;&amp;Mbx=&lt;Mbx&gt;&amp;realm=LINHA05-EX20131.com</EcpUrl-mt>
            <EcpUrl-ret>?rfr=olk&amp;p=organize/retentionpolicytags.slab&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-ret>
            <EcpUrl-sms>?rfr=olk&amp;p=sms/textmessaging.slab&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-sms>
            <EcpUrl-publish>customize/calendarpublishing.slab?rfr=olk&amp;exsvurl=1&amp;FldID=&lt;FldID&gt;&amp;realm=LINHA05-EX20131.com</EcpUrl-publish>
            <EcpUrl-photo>PersonalSettings/EditAccount.aspx?rfr=olk&amp;chgPhoto=1&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-photo>
            <EcpUrl-tm>?rfr=olk&amp;ftr=TeamMailbox&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-tm>
            <EcpUrl-tmCreating>?rfr=olk&amp;ftr=TeamMailboxCreating&amp;SPUrl=&lt;SPUrl&gt;&amp;Title=&lt;Title&gt;&amp;SPTMAppUrl=&lt;SPTMAppUrl&gt;&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-tmCreating>
            <EcpUrl-tmEditing>?rfr=olk&amp;ftr=TeamMailboxEditing&amp;Id=&lt;Id&gt;&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-tmEditing>
            <EcpUrl-extinstall>Extension/InstalledExtensions.slab?rfr=olk&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-extinstall>
            <OOFUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</OOFUrl>
            <UMUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/UM2007Legacy.asmx</UMUrl>
            <OABUrl>https://linha05-m-cas10.linha05-ex20131.com/OAB/4a508bd4-fe63-47d4-95da-031885a3b501/</OABUrl>
            <ServerExclusiveConnect>off</ServerExclusiveConnect>
          </Protocol>
          <Protocol>
            <Type>EXPR</Type>
            <Server>linha05-m-cas10.linha05-ex20131.com</Server>
            <SSL>On</SSL>
            <AuthPackage>Ntlm</AuthPackage>
            <ServerExclusiveConnect>on</ServerExclusiveConnect>
            <GroupingInformation>Default-First-Site-Name</GroupingInformation>
          </Protocol>
          <Protocol>
            <Type>WEB</Type>
            <Internal>
              <OWAUrl AuthenticationMethod="Basic, Fba">https://linha05-m-cas10.linha05-ex20131.com/owa/</OWAUrl>
              <Protocol>
                <Type>EXCH</Type>
                <ASUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</ASUrl>
              </Protocol>
            </Internal>
          </Protocol>
        </Account>
      </Response>
    </Autodiscover>

    from outlook:

    <?xml version="1.0" encoding="utf-8"?>
    <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
      <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
        <User>
          <DisplayName>xi la</DisplayName>
          <LegacyDN>/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=090fbaff861f4e0ebf4929476e0e94fe-xi la</LegacyDN>
          <AutoDiscoverSMTPAddress>xila@linha05-ex20131.com</AutoDiscoverSMTPAddress>
          <DeploymentId>4ab28253-d565-4169-97fb-86fb335d11a9</DeploymentId>
        </User>
        <Account>
          <AccountType>email</AccountType>
          <Action>settings</Action>
          <MicrosoftOnline>False</MicrosoftOnline>
          <Protocol>
            <Type>EXCH</Type>
            <Server>eec1c713-b3b0-4430-a201-36ec36c2c0de@linha05-ex20131.com</Server>
            <ServerDN>/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=eec1c713-b3b0-4430-a201-36ec36c2c0de@linha05-ex20131.com</ServerDN>
            <ServerVersion>73C08391</ServerVersion>
            <MdbDN>/o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=eec1c713-b3b0-4430-a201-36ec36c2c0de@linha05-ex20131.com/cn=Microsoft Private MDB</MdbDN>
            <PublicFolderServer>linha05-m-cas10.linha05-ex20131.com</PublicFolderServer>
            <AD>LINHA05-AD2010.LINHA05-EX20131.com</AD>
            <ASUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</ASUrl>
            <EwsUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</EwsUrl>
            <EmwsUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</EmwsUrl>
            <EcpUrl>https://linha05-m-cas10.linha05-ex20131.com/ecp/</EcpUrl>
            <EcpUrl-um>?rfr=olk&amp;p=customize/voicemail.aspx&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-um>
            <EcpUrl-aggr>?rfr=olk&amp;p=personalsettings/EmailSubscriptions.slab&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-aggr>
            <EcpUrl-mt>PersonalSettings/DeliveryReport.aspx?rfr=olk&amp;exsvurl=1&amp;IsOWA=&lt;IsOWA&gt;&amp;MsgID=&lt;MsgID&gt;&amp;Mbx=&lt;Mbx&gt;&amp;realm=LINHA05-EX20131.com</EcpUrl-mt>
            <EcpUrl-ret>?rfr=olk&amp;p=organize/retentionpolicytags.slab&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-ret>
            <EcpUrl-sms>?rfr=olk&amp;p=sms/textmessaging.slab&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-sms>
            <EcpUrl-publish>customize/calendarpublishing.slab?rfr=olk&amp;exsvurl=1&amp;FldID=&lt;FldID&gt;&amp;realm=LINHA05-EX20131.com</EcpUrl-publish>
            <EcpUrl-photo>PersonalSettings/EditAccount.aspx?rfr=olk&amp;chgPhoto=1&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-photo>
            <EcpUrl-extinstall>Extension/InstalledExtensions.slab?rfr=olk&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-extinstall>
            <OOFUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</OOFUrl>
            <UMUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/UM2007Legacy.asmx</UMUrl>
            <OABUrl>https://linha05-m-cas10.linha05-ex20131.com/OAB/4a508bd4-fe63-47d4-95da-031885a3b501/</OABUrl>
            <ServerExclusiveConnect>off</ServerExclusiveConnect>
          </Protocol>
          <Protocol>
            <Type>EXPR</Type>
            <Server>linha05-m-cas10.linha05-ex20131.com</Server>
            <SSL>On</SSL>
            <AuthPackage>Ntlm</AuthPackage>
            <ServerExclusiveConnect>on</ServerExclusiveConnect>
            <GroupingInformation>Default-First-Site-Name</GroupingInformation>
          </Protocol>
          <Protocol>
            <Type>WEB</Type>
            <Internal>
              <OWAUrl AuthenticationMethod="Basic, Fba">https://linha05-m-cas10.linha05-ex20131.com/owa/</OWAUrl>
              <Protocol>
                <Type>EXCH</Type>
                <ASUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</ASUrl>
              </Protocol>
            </Internal>
          </Protocol>
          <Protocol>
            <Type>EXHTTP</Type>
            <Server>linha05-m-cas10.linha05-ex20131.com</Server>
            <SSL>On</SSL>
            <AuthPackage>Ntlm</AuthPackage>
            <ASUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</ASUrl>
            <EwsUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</EwsUrl>
            <EmwsUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</EmwsUrl>
            <EcpUrl>https://linha05-m-cas10.linha05-ex20131.com/ecp/</EcpUrl>
            <EcpUrl-um>?rfr=olk&amp;p=customize/voicemail.aspx&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-um>
            <EcpUrl-aggr>?rfr=olk&amp;p=personalsettings/EmailSubscriptions.slab&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-aggr>
            <EcpUrl-mt>PersonalSettings/DeliveryReport.aspx?rfr=olk&amp;exsvurl=1&amp;IsOWA=&lt;IsOWA&gt;&amp;MsgID=&lt;MsgID&gt;&amp;Mbx=&lt;Mbx&gt;&amp;realm=LINHA05-EX20131.com</EcpUrl-mt>
            <EcpUrl-ret>?rfr=olk&amp;p=organize/retentionpolicytags.slab&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-ret>
            <EcpUrl-sms>?rfr=olk&amp;p=sms/textmessaging.slab&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-sms>
            <EcpUrl-publish>customize/calendarpublishing.slab?rfr=olk&amp;exsvurl=1&amp;FldID=&lt;FldID&gt;&amp;realm=LINHA05-EX20131.com</EcpUrl-publish>
            <EcpUrl-photo>PersonalSettings/EditAccount.aspx?rfr=olk&amp;chgPhoto=1&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-photo>
            <EcpUrl-extinstall>Extension/InstalledExtensions.slab?rfr=olk&amp;exsvurl=1&amp;realm=LINHA05-EX20131.com</EcpUrl-extinstall>
            <OOFUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/Exchange.asmx</OOFUrl>
            <UMUrl>https://linha05-m-cas10.linha05-ex20131.com/EWS/UM2007Legacy.asmx</UMUrl>
            <OABUrl>https://linha05-m-cas10.linha05-ex20131.com/OAB/4a508bd4-fe63-47d4-95da-031885a3b501/</OABUrl>
            <ServerExclusiveConnect>On</ServerExclusiveConnect>
          </Protocol>
        </Account>
      </Response>
    </Autodiscover>

    Wednesday, November 19, 2014 9:35 AM

Answers

  • Are you running 2013 SP1 CU6 in your environment ? that header will only work on build from this version. What I would suggest is you try adding the following useragent in the AutoDiscoverRequest which should work to return those setting on any 2013 server.

    poxRequest.UserAgent = "Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.6112; Pro)";
    Cheers
    Glen

    • Marked as answer by Haiyang_It Thursday, November 20, 2014 7:33 AM
    Thursday, November 20, 2014 3:17 AM

All replies

  • Are you running 2013 SP1 CU6 in your environment ? that header will only work on build from this version. What I would suggest is you try adding the following useragent in the AutoDiscoverRequest which should work to return those setting on any 2013 server.

    poxRequest.UserAgent = "Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.6112; Pro)";
    Cheers
    Glen

    • Marked as answer by Haiyang_It Thursday, November 20, 2014 7:33 AM
    Thursday, November 20, 2014 3:17 AM
  • I check the version and it's 15.00.0913.019(CU5).

    After adding the code your mentioned, it can work. Thank you very much.

    Regards, 

    Haiyang

    Thursday, November 20, 2014 7:49 AM