4.3 GetUserSettings Operation

The two examples in this section show how to construct the request XML and response XML for the GetUserSettings operation.

To retrieve the requested user settings, the client constructs the Autodiscover request XML and sends it to the server, as shown in the following example.

   <?xml version="1.0" encoding="utf-8"?>
   <soap:Envelope xmlns:a="http://schemas.microsoft.com/exchange/2010/Autodiscove
 r" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:xsi="http://www.w3.org
 /2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
 > 
     <soap:Header>
       <a:RequestedServerVersion>Exchange2010</a:RequestedServerVersion>
       <wsa:Action>http://schemas.microsoft.com/exchange/2010/Autodiscover/Autodi
 scover/GetUserSettings</wsa:Action>
       <wsa:To>https://autodiscover.exchange.microsoft.com/autodiscover/autodisco
 ver.svc</wsa:To>
     </soap:Header>
     <soap:Body>
       <a:GetUserSettingsRequestMessage xmlns:a="http://schemas.microsoft.com/exc
 hange/2010/Autodiscover">
         <a:Request>
           <a:Users>
             <a:User>
               <a:Mailbox>tadam@exchange.microsoft.com</a:Mailbox>
             </a:User>
           </a:Users>
           <a:RequestedSettings>
             <a:Setting>UserDisplayName</a:Setting>
             <a:Setting>UserDN</a:Setting>
             <a:Setting>UserDeploymentId</a:Setting>
             <a:Setting>InternalMailboxServer</a:Setting>
             <a:Setting>MailboxDN</a:Setting>
             <a:Setting>PublicFolderServer</a:Setting>
             <a:Setting>ActiveDirectoryServer</a:Setting>
             <a:Setting>ExternalEwsUrl</a:Setting>
             <a:Setting>CasVersion</a:Setting>
             <a:Setting>EwsSupportedSchemas</a:Setting>
           </a:RequestedSettings>
         </a:Request>
       </a:GetUserSettingsRequestMessage>
     </soap:Body>
   </soap:Envelope>

The server then constructs the Autodiscover response XML and sends it to the client, as shown in the following example.

 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http:
 //www.w3.org/2005/08/addressing">
     <s:Header>
       <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/exchange/2010/
 Autodiscover/Autodiscover/GetUserSettingsResponse</a:Action>
       <h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/2010/A
 utodiscover" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <h:MajorVersion>14</h:MajorVersion>
         <h:MinorVersion>1</h:MinorVersion>
         <h:MajorBuildNumber>63</h:MajorBuildNumber>
         <h:MinorBuildNumber>0</h:MinorBuildNumber>
         <h:Version>Exchange2010_SP1</h:Version>
       </h:ServerVersionInfo>
     </s:Header>
     <s:Body>
       <GetUserSettingsResponseMessage xmlns="http://schemas.microsoft.com/exchan
 ge/2010/Autodiscover">
         <Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
           <ErrorCode>NoError</ErrorCode>
           <ErrorMessage />
           <UserResponses>
             <UserResponse>
               <ErrorCode>NoError</ErrorCode>
               <ErrorMessage>No error.</ErrorMessage>
               <RedirectTarget i:nil="true" />
               <UserSettingErrors />
               <UserSettings>
                 <UserSetting i:type="StringSetting">
                   <Name>UserDisplayName</Name>
                   <Value>Terry Adams</Value>
                 </UserSetting>
                 <UserSetting i:type="StringSetting">
                   <Name>UserDN</Name>
                   <Value>/o=microsoft/ou=Exchange Administrative Group (FYDIBOHF
 23SPDLT)/cn=Recipients/cn=tadam</Value>
                 </UserSetting>
                 <UserSetting i:type="StringSetting">
                   <Name>UserDeploymentId</Name>
                   <Value>649d50b8-a1ce-4bac-8ace-2321e463f701</Value>
                 </UserSetting>
                 <UserSetting i:type="StringSetting">
                   <Name>CasVersion</Name>
                   <Value>14.01.0063.000</Value>
                 </UserSetting>
                 <UserSetting i:type="StringSetting">
                   <Name>EwsSupportedSchemas</Name>
                   <Value>Exchange2007, Exchange2007_SP1, Exchange2010, Exchange2010_SP1</Value>
                 </UserSetting>
                 <UserSetting i:type="StringSetting">
                   <Name>InternalMailboxServer</Name>
                   <Value>DF-M14-05.Contoso.com</Value>
                 </UserSetting>
                 <UserSetting i:type="StringSetting">
                   <Name>ActiveDirectoryServer</Name>
                   <Value>CO1-EXCH-DC-05.Contoso.com</Value>
                 </UserSetting>
                 <UserSetting i:type="StringSetting">
                   <Name>MailboxDN</Name>
                   <Value>/o=microsoft/ou=Exchange Administrative Group (FYDIBOHF
 23SPDLT)/cn=Configuration/cn=Servers/cn=outlookbeta.exchange.corp.microsoft.com/
 cn=Microsoft Private MDB</Value>
                 </UserSetting>
                 <UserSetting i:type="StringSetting">
                   <Name>PublicFolderServer</Name>
                   <Value>DF-P14-01.Contoso.com</Value>
                 </UserSetting>
                 <UserSetting i:type="StringSetting">
                   <Name>ExternalEwsUrl</Name>
                   <Value>https://mail.Contoso.com/EWS/Exchange.asmx</
 Value>
                 </UserSetting>
               </UserSettings>
             </UserResponse>
           </UserResponses>
         </Response>
       </GetUserSettingsResponseMessage>
     </s:Body>
   </s:Envelope>
Show: