3.1.4.1 GetUserOofSettings Operation

The GetUserOofSettings operation retrieves the OOF settings and OOF messages from a user's mailbox.

The following is the WSDL port type specification for this operation.

 <wsdl:operation name="GetUserOofSettings">
     <wsdl:input message="tns:GetUserOofSettingsSoapIn" />
     <wsdl:output message="tns:GetUserOofSettingsSoapOut" />
 </wsdl:operation>

The following is the WSDL binding specification for this operation.<2>

 <wsdl:operation name="GetUserOofSettings">
    <soap:operation soapAction="http://schemas.microsoft.com/exchange/services/2006/messages/GetUserOofSettings"/>
    <wsdl:input>
       <soap:header message="tns:GetUserOofSettingsSoapIn" part="Impersonation" use="literal"/>
       <soap:body parts="GetUserOofSettingsRequest" use="literal"/>
    </wsdl:input>
    <wsdl:output>
       <soap:body parts="GetUserOofSettingsResult" use="literal"/>
       <soap:header message="tns:GetUserOofSettingsSoapOut" part="ServerVersion" use="literal"/>
    </wsdl:output>
 </wsdl:operation>

For a successful request, the GetUserOofSettings operation MUST return a GetUserOofSettingsResponse element with the ResponseClass attribute of the ResponseMessage element set to "Success". The ResponseCode element of the ResponseMessage element MUST be set to "NoError".

If the mailbox that is specified in the request does not belong to the user who is making the request, the server MUST return a SOAP fault. The following XML specifies the SOAP body that MUST be returned.

 <soap:Body>
     <soap:Fault>
       <faultcode>soap:Client</faultcode>
       <faultstring>Microsoft.Exchange.Data.Storage.AccessDeniedException: User is not mailbox owner. User = *UserID*, MailboxGuid = *MailboxID* ---> User is not mailbox owner. </faultstring>
       <faultactor>https://CAS01.example.com/EWS/Exchange.asmx</faultactor>
       <detail>
         <ErrorCode xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">-2146233088</ErrorCode>
       </detail>
     </soap:Fault>
   </soap:Body>
  

The faultstring element MUST contain the User ID of the user who is making the request and the Mailbox ID of the mailbox for which the attempt was made to change the OOF message.