locked
EWS Managed API retrieving Exchange version RRS feed

  • Question

  • From what I understand, when I call ExchangeService(version), I can specify the lowest version I want (e.g.  Exchange2010_SP1_ but get Exchange2010_SP2).

    Is there a way to query the service to determine the exact version that I got?

    I know I can retrieve it from service.ServerInfo but that is only AFTER it has already processed a request.

    I also tried using the Autodiscover service GetUserSetting with CasVersion but got an exception

    "The request failed schema validation: Could not find schema information for the element 'http://schemas.microsoft.com/exchange/2010/Autodiscover:GetUserSettingsRequestMessage'."} System.Exception {Microsoft.Exchange.WebServices.Data.ServiceResponseException}


    • Edited by jquan Thursday, January 16, 2014 4:34 PM
    Thursday, January 16, 2014 4:22 PM

All replies

  • >I also tried using the Autodiscover service GetUserSetting with CasVersion but got an exception

    That should work but will only work against an Exchange 2010 and up server are you trying to use that against Exchange 2007 ? What does your code look like ?.

    Otherwise the only other way to get that information if you using OnPrem Exchange is you could query Active Directory Via LDAP or use Remote Powershell. (generally the easiest is just specify 2007_SP1 make a simple request and check the result of Server.Info to see what the server is running which will work on any version of Exchange and is pretty lightweight).

    Cheers
    Glen

    Friday, January 17, 2014 3:35 AM
  • Thanks, I think I created the AutodiscoverService object incorrectly.  I now have it with no arguments and was able to get the user properties.  However, I discovered that CasVersion was not what I wanted anyway.

    Instead I look up EwsSupportedSchemas to get he highest supported schema.  

    Friday, January 17, 2014 3:15 PM