Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

Exchange EWS SOAP: GetUserSettingsRequest sais invalid user - but with Outlook everything is fine. :-(

$
0
0

Hello,

I've a problem with my software on the system of a customer. He create a user wich has impersonation rights (the user name is impuser@mydomain.com). When he uses Outlook and makes the autodiscover stuff with outlook, everything seems to be fine. The user also has a mailbox (at least the customer told my, sadly I cannot check that part). My app uses the impuser@mydomain.com to detect the autodiscover URL and connets to that URL authenticating with the user works fine. Then I send the message to get the settings for that user (I use it also to autodetect the server version used). But Exchange resonses "invalid user".

Has anyone an idea what the problem can be or how I can figure out the problem to solve it? The customer has Exchange 2015 (15.1.1913.5). Here is the XML SOAP request and the answer:

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:a="http://schemas.microsoft.com/exchange/2010/Autodiscover" 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>Exchange2013</a:RequestedServerVersion><wsa:Action>http://schemas.microsoft.com/exchange/2010/Autodiscover/Autodiscover/GetUserSettings</wsa:Action><wsa:To /></soap:Header><soap:Body><a:GetUserSettingsRequestMessage><a:Request><a:Users><a:User><a:Mailbox>impuser@mydomain.com</a:Mailbox></a:User></a:Users><a:RequestedSettings><a:Setting>InternalEwsUrl</a:Setting><a:Setting>ExternalEwsUrl</a:Setting><a:Setting>GroupingInformation</a:Setting></a:RequestedSettings></a:Request></a:GetUserSettingsRequestMessage></soap:Body></soap:Envelope>


Answer:

<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/Autodiscover" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><h:MajorVersion>15</h:MajorVersion><h:MinorVersion>1</h:MinorVersion><h:MajorBuildNumber>1913</h:MajorBuildNumber><h:MinorBuildNumber>5</h:MinorBuildNumber><h:Version>Exchange2015</h:Version></h:ServerVersionInfo></s:Header><s:Body><GetUserSettingsResponseMessage xmlns="http://schemas.microsoft.com/exchange/2010/Autodiscover"><Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ErrorCode>NoError</ErrorCode><ErrorMessage/><UserResponses><UserResponse><ErrorCode>InvalidUser</ErrorCode><ErrorMessage>Invalid user 'impuser@mydomain.com' specified. </ErrorMessage><RedirectTarget i:nil="true"/><UserSettingErrors/><UserSettings/></UserResponse></UserResponses></Response></GetUserSettingsResponseMessage></s:Body></s:Envelope>



Viewing all articles
Browse latest Browse all 2257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>