Exchange Online EWS Only Returns Availability when MinimumSuggestionQuality is set to Poor - Why?
We are using impersonation to access mailboxes hosted in Office 365 using EWS but the app will only return available timeslots when the availabilityOptions.MinimumSuggestionQuality = SuggestionQuality.Poor. I've tried adjusting the availabilityOptions.GoodSuggestionThreshold
to no avail. Beyond assigning the "ApplicationImpersonation" role to the account being used to access mailboxes, are there any other permissions, licenses, or attributes that need to be set in order to use EWS to query for free/busy time?
The code snippet is below.
//Returns a list of TimeSuggestions for the specified user(email) and date.
string MyUser = "[email protected]";
//LB Note: Pulled impersonation information from https://msdn.microsoft.com/en-us/library/office/dn722379(v=exchg.150).aspx#sectionSection1
service.Credentials = new NetworkCredential("[email protected]", "acns_calendarapptestpw");
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
//Changing MyUser to an invalid user ([email protected]) or a valid user (o365test100) that the app doesn't
//have impersonation rights to will throw an error stating as much
service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.PrincipalName, MyUser);
List<TimeSuggestion> suggestions = new List<TimeSuggestion>();
//LB Note: I pulled this example from https://msdn.microsoft.com/en-us/library/office/dn643673(v=exchg.150).aspx
List<AttendeeInfo> attendees = new List<AttendeeInfo>();
attendees.Add(new AttendeeInfo()
SmtpAddress = MyUser,
AttendeeType = MeetingAttendeeType.Organizer
// Specify options to request free/busy information and suggested meeting times.
AvailabilityOptions availabilityOptions = new AvailabilityOptions();
availabilityOptions.GoodSuggestionThreshold = 10;
availabilityOptions.MaximumNonWorkHoursSuggestionsPerDay = 1;
availabilityOptions.MaximumSuggestionsPerDay = 30;
availabilityOptions.MeetingDuration = 60;
// LB Note: Setting this to "Poor" was the only way I could get results to show. Not sure what's going on here.
availabilityOptions.
//Returns a list of TimeSuggestions for the specified user(email) and date.
string MyUser = "[email protected]";
//LB Note: Pulled impersonation information from https://msdn.microsoft.com/en-us/library/office/dn722379(v=exchg.150).aspx#sectionSection1
service.Credentials = new NetworkCredential("[email protected]", "acns_calendarapptestpw");
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
//Changing MyUser to an invalid user ([email protected]) or a valid user (o365test100) that the app doesn't
//have impersonation rights to will throw an error stating as much
service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.PrincipalName, MyUser);
List<TimeSuggestion> suggestions = new List<TimeSuggestion>();
//LB Note: I pulled this example from https://msdn.microsoft.com/en-us/library/office/dn643673(v=exchg.150).aspx
List<AttendeeInfo> attendees = new List<AttendeeInfo>();
attendees.Add(new AttendeeInfo()
SmtpAddress = MyUser,
AttendeeType = MeetingAttendeeType.Organizer
// Specify options to request free/busy information and suggested meeting times.
AvailabilityOptions availabilityOptions = new AvailabilityOptions();
availabilityOptions.GoodSuggestionThreshold = 10;
availabilityOptions.MaximumNonWorkHoursSuggestionsPerDay = 1;
availabilityOptions.MaximumSuggestionsPerDay = 30;
availabilityOptions.MeetingDuration = 60;
// LB Note: Setting this to "Poor" was the only way I could get results to show. Not sure what's going on here.
availabilityOptions.MinimumSuggestionQuality = SuggestionQuality.Poor;
availabilityOptions.DetailedSuggestionsWindow = new TimeWindow(Convert.ToDateTime("4/1/2015"), Convert.ToDateTime("4/2/2015"));
availabilityOptions.RequestedFreeBusyView = FreeBusyViewType.FreeBusy;
// Return free/busy information and a set of suggested meeting times.
// This method results in a GetUserAvailabilityRequest call to EWS.
GetUserAvailabilityResults results = service.GetUserAvailability(attendees,
availabilityOptions.DetailedSuggestionsWindow,
AvailabilityData.FreeBusyAndSuggestions,
availabilityOptions);
= SuggestionQuality.Poor;
availabilityOptions.DetailedSuggestionsWindow = new TimeWindow(Convert.ToDateTime("4/1/2015"), Convert.ToDateTime("4/2/2015"));
availabilityOptions.RequestedFreeBusyView = FreeBusyViewType.FreeBusy;
// Return free/busy information and a set of suggested meeting times.
// This method results in a GetUserAvailabilityRequest call to EWS.
GetUserAvailabilityResults results = service.GetUserAvailability(attendees,
availabilityOptions.DetailedSuggestionsWindow,
AvailabilityData.FreeBusyAndSuggestions,
availabilityOptions);
For EWS to work with App Token, you need to do two more things. One you already did: Set the impersonation header. Two is to set the X-AnchorMailbox http request header to the smtp address of the mailbox you want to access. This routes the request instantly
to the right backend.
Hope this helps.
Thank you! Matthias
Similar Messages
-
Exchange Online Management cmdlets return Display Name instead of Identity
Hello,
We've got an issue when managing our Exchange Online environment using remote PowerShell.
We use Exchange management cmdlets to manage Exchange Online mailboxes. When we run, for example, the
Get-MailboxPermission or Get-RecipientPermission
cmdlets, it returns Display Names of the users with mailbox rights. Previously, when we initially tested remote PowerShell with Exchange Online, the cmdlets returned the
Identity property, which is unique and worked well for us. However, currently the cmdlets return the
Display Name, which is not unique and causes us issues. For example, in our environment there can exist two or more users with the same Display Name (see highlighted on the screenshot):
In cases when only one of the users is granted a permission, we cannot distinguish programmatically, which of the 2 users this is. Also, we cannot run cmdlets, such as
Get-SecurityPrincipal, to get more info about the principals who are granted the permission.
Is it possible to get the old behavior of the cmdlets back so that they return the unique
Identity instead of the non-unique Display Name? Or how do we workaround this?Hello,
Can anyone update on this? The issue causes us HUGE problems :( -
ASP Web Forms Error: Session state can only be used when enableSessionState is set to true
Hello,
I am developing a custom application page for a custom Web Forms I am creating, which I plan on using for custom task form into SharePoint 2010 Foundation.
Currently, I am trying to test it in Debug Mode using Visual Studio 2010 but when I am trying to use Sessions I get the error:
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration
I've already done this on trying to fix:
On my page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestForm.aspx.cs" Inherits="TestForm" EnableSessionState="True" %>
And on my web.config
<pages enableSessionState="true">..<httpModules>
<remove name="Session" />
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</httpModules>
Note: I am getting an error when I try to add <module> into web.config
ASP .NET State Service is currently running.
And the part where it keeps error is when in PageLoad, I try to set a List object something like this:
List<object> myobject
get
if (Session["object"] == null)
Session["object"] = new List<object>();
return Session["object"] as List<object>;
set
Session["object"] = value;
protected void Page_Load(object sender, EventArgs e)
myobject= new List<object>();
BUT the error still persists! I also try to restart IIS but still the error still happens.
I am running out of ideas so can you help me out?
Thank you!Could be your skype intercepting your requests at 80 port, in Skype options uncheck
Or Your IE has connection checked for Proxy when there is no proxy
Or your fiddler could intercept and act as proxy, uncheck it!
Solves the above problem, It solved mine!
HydTechie
HydPhani -
Session state can only be used when enablesessionstate is set to true.
When I try to open up a certain webpage it says; Session state can only be used when enablesessionstate is set to true. What does it mean and what should I do?
Contact the webmaster for that site and report the problem.
-
Hi,
i'm working on enhancing a service to be able to use OAUTH2 as authentication protocol with client credential grant flow when talking to exchange online ( like described here:
http://blogs.msdn.com/b/exchangedev/archive/2015/01/22/building-demon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow.aspx ). I gave my application the rights
Office 365 Exchange Online : Application Permissions: "Have full access via EWS to all mailboxes ....."
Windows Azure Active AD: Application Permissions: "Read Directory data", Delegate Permissions: "Enable sign-on and read users_ profiles"
I receive a access token from log.windows.net:
decoded token:
typ: "JWT",
alg: "RS256",
x5t: "MnC_VZcATfM5pOYiJHMba9goEKY"
aud: "https://outlook.office365.com/",
iss: "https://sts.windows.net/<TENANT_ID>/",
iat: 1426584502,
nbf: 1426584502,
exp: 1426588402,
ver: "1.0",
tid: "<TENANT_ID>",
roles: [
"full_access_as_app"
oid: "1ddbdc11-b80d-4d1d-91b9-5b07a6b82659",
sub: "1ddbdc11-b80d-4d1d-91b9-5b07a6b82659",
idp: "https://sts.windows.net/TENANT_ID/",
appid: "<APP_ID_IN_AZURE_AD>",
appidacr: "2"
<SIGNATURE>
If i use that token then to send a EWS XML to exchange online i get a 500 HTTP status code back:
With impersonation in the request:
[http.wire ]: >> "POST /EWS/Exchange.asmx HTTP/1.1[\r][\n]"
[http.wire ]: >> "Authorization: Bearer <MY_ACCESS_TOKEN>[\r][\n]"
[http.wire ]: >> "SoapAction: "http://schemas.microsoft.com/exchange/services/2006/messages/GetFolder"[\r][\n]"
[http.wire ]: >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
[http.wire ]: >> "User-Agent: OpenScapeUC EWS HttpClient/3.0[\r][\n]"
[http.wire ]: >> "client-request-id: 5b2c7e1a-656d-4f43-bd34-ea2d6290611f[\r][\n]"
[http.wire ]: >> "Date: Tue, 17 Mar 2015 10:08:17 GMT[\r][\n]"
[http.wire ]: >> "Content-Length: 1189[\r][\n]"
[http.wire ]: >> "Host: outlook.office365.com[\r][\n]"
[http.wire ]: >> "Connection: Keep-Alive[\r][\n]"
[http.wire ]: >> "[\r][\n]"
[http.wire ]: >> "<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Header><ns2:ExchangeImpersonation xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:ns3="http://schemas.microsoft.com/exchange/services/2006/messages"><ns2:ConnectingSID><ns2:PrimarySmtpAddress><THE_MAILBOX_I_WANT_TO_ACCESS></ns2:PrimarySmtpAddress></ns2:ConnectingSID></ns2:ExchangeImpersonation><ns2:RequestServerVersion
xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns3="http://schemas.microsoft.com/exchange/services/2006/messages" Version="Exchange2007_SP1"/></S:Header><S:Body><ns3:GetFolder xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:ns3="http://schemas.microsoft.com/exchange/services/2006/messages"><ns3:FolderShape><ns2:BaseShape>IdOnly</ns2:BaseShape><ns2:AdditionalProperties><ns2:FieldURI FieldURI="folder:FolderId"/></ns2:AdditionalProperties></ns3:FolderShape><ns3:FolderIds><ns2:DistinguishedFolderId
Id="contacts"><ns2:Mailbox><ns2:EmailAddress><THE_MAILBOX_I_WANT_TO_ACCESS></ns2:EmailAddress></ns2:Mailbox></ns2:DistinguishedFolderId></ns3:FolderIds></ns3:GetFolder></S:Body></S:Envelope>"
[http.wire ]: << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[http.wire ]: << "Cache-Control: private[\r][\n]"
[http.wire ]: << "Content-Type: text/xml; charset=utf-8[\r][\n]"
[http.wire ]: << "Server: Microsoft-IIS/8.0[\r][\n]"
[http.wire ]: << "request-id: ec42b5c5-f8dc-498d-ae16-d851a852058c[\r][\n]"
[http.wire ]: << "Set-Cookie: ClientId=<DELETED>; expires=Wed, 16-Mar-2016 10:08:17 GMT; path=/; secure; HttpOnly[\r][\n]"
[http.wire ]: << "X-CalculatedBETarget: am2pr02mb0387.eurprd02.prod.outlook.com[\r][\n]"
[http.wire ]: << "X-DiagInfo: AM2PR02MB0387[\r][\n]"
[http.wire ]: << "X-BEServer: AM2PR02MB0387[\r][\n]"
[http.wire ]: << "X-AspNet-Version: 4.0.30319[\r][\n]"
[http.wire ]: << "Set-Cookie: exchangecookie=<DELETED>; expires=Thu, 17-Mar-2016 10:08:17 GMT; path=/; HttpOnly[\r][\n]"
[http.wire ]: << "Set-Cookie: [email protected]=<DELETED>; expires=Thu, 16-Apr-2015 10:08:18 GMT; path=/EWS; secure; HttpOnly[\r][\n]"
[http.wire ]: << "Set-Cookie: [email protected]=<DELETED>; expires=Thu, 16-Apr-2015 10:08:18 GMT; path=/EWS; secure; HttpOnly[\r][\n]"
[http.wire ]: << "X-Powered-By: ASP.NET[\r][\n]"
[http.wire ]: << "X-FEServer: DB5PR01CA0064[\r][\n]"
[http.wire ]: << "Date: Tue, 17 Mar 2015 10:08:17 GMT[\r][\n]"
[http.wire ]: << "Content-Length: 891[\r][\n]"
[http.wire ]: << "Accept-Ranges: none[\r][\n]"
[http.wire ]: << "Connection: keep-alive[\r][\n]"
[http.wire ]: << "[\r][\n]"
Without impersonation in the request:
Request
[http.wire ]: >> "POST /EWS/Exchange.asmx HTTP/1.1[\r][\n]"
[http.wire ]: >> "Authorization: Bearer <MY_ACCESS_TOKEN>[\r][\n]"
[http.wire ]: >> "SoapAction: "http://schemas.microsoft.com/exchange/services/2006/messages/GetFolder"[\r][\n]"
[http.wire ]: >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
[http.wire ]: >> "User-Agent: OpenScapeUC EWS HttpClient/3.0[\r][\n]"
[http.wire ]: >> "client-request-id: 20bd722f-8276-4ebb-8d58-ce45d31f3ed4[\r][\n]"
[http.wire ]: >> "Date: Tue, 17 Mar 2015 09:33:24 GMT[\r][\n]"
[http.wire ]: >> "Content-Length: 871[\r][\n]"
[http.wire ]: >> "Host: outlook.office365.com[\r][\n]"
[http.wire ]: >> "Connection: Keep-Alive[\r][\n]"
[http.wire ]: >> "[\r][\n]"
[http.wire ]: >> "<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Header><ns2:RequestServerVersion xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:ns3="http://schemas.microsoft.com/exchange/services/2006/messages" Version="Exchange2007_SP1"/></S:Header><S:Body><ns3:GetFolder xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns3="http://schemas.microsoft.com/exchange/services/2006/messages"><ns3:FolderShape><ns2:BaseShape>IdOnly</ns2:BaseShape><ns2:AdditionalProperties><ns2:FieldURI
FieldURI="folder:FolderId"/></ns2:AdditionalProperties></ns3:FolderShape><ns3:FolderIds><ns2:DistinguishedFolderId Id="contacts"><ns2:Mailbox><ns2:EmailAddress><THE_MAILBOX_I_WANT_TO_ACCESS></ns2:EmailAddress></ns2:Mailbox></ns2:DistinguishedFolderId></ns3:FolderIds></ns3:GetFolder></S:Body></S:Envelope>"
Response:
[http.wire ]: << "HTTP/1.1 500 Internal Server Error[\r][\n]"
[http.wire ]: << "Cache-Control: private[\r][\n]"
[http.wire ]: << "Content-Type: text/xml; charset=utf-8[\r][\n]"
[http.wire ]: << "Server: Microsoft-IIS/8.0[\r][\n]"
[http.wire ]: << "request-id: 923ba463-490f-4ac9-a496-993cd8a44115[\r][\n]"
[http.wire ]: << "Set-Cookie: ClientId=<DELETED>; expires=Wed, 16-Mar-2016 09:33:24 GMT; path=/; secure; HttpOnly[\r][\n]"
[http.wire ]: << "X-CalculatedBETarget: am2pr02mb0387.eurprd02.prod.outlook.com[\r][\n]"
[http.wire ]: << "X-DiagInfo: AM2PR02MB0387[\r][\n]"
[http.wire ]: << "X-BEServer: AM2PR02MB0387[\r][\n]"
[http.wire ]: << "X-AspNet-Version: 4.0.30319[\r][\n]"
[http.wire ]: << "Set-Cookie: exchangecookie=<DELETED>; expires=Thu, 17-Mar-2016 09:33:25 GMT; path=/; HttpOnly[\r][\n]"
[http.wire ]: << "Set-Cookie: [email protected]=<DELETED>; expires=Thu, 16-Apr-2015 09:33:25 GMT; path=/EWS; secure; HttpOnly[\r][\n]"
[http.wire ]: << "Set-Cookie: [email protected]=<DELETED>; expires=Thu, 16-Apr-2015 09:33:25 GMT; path=/EWS; secure; HttpOnly[\r][\n]"
[http.wire ]: << "X-Powered-By: ASP.NET[\r][\n]"
[http.wire ]: << "X-FEServer: AM3PR07CA0038[\r][\n]"
[http.wire ]: << "Date: Tue, 17 Mar 2015 09:33:24 GMT[\r][\n]"
[http.wire ]: << "Content-Length: 799[\r][\n]"
[http.wire ]: << "Accept-Ranges: none[\r][\n]"
[http.wire ]: << "Connection: keep-alive[\r][\n]"
If i use BASIC authentication and impersonation the request is successfully.
Has anyone an idea why i might get the error 500 in that scenario?For EWS to work with App Token, you need to do two more things. One you already did: Set the impersonation header. Two is to set the X-AnchorMailbox http request header to the smtp address of the mailbox you want to access. This routes the request instantly
to the right backend.
Hope this helps.
Thank you! Matthias -
EWS Manage Api Exchange Online TokenCredentials always returning 401
Hi,
Im trying to get acces to Exchange Online with the EWS manage api 2.2 and Im trying using this
ExchangeService service = new ExchangeService();
service.TraceEnabled = true;
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
//service.HttpHeaders.Add("Authorization", "Bearer " + token);
service.Credentials = new TokenCredentials(token);
//service.PreAuthenticate = true;
//service.SendClientLatencies = true;
//service.EnableScpLookup = false;
Always I get 401 unauthorized the token I get Azure Ad Authentication library , with this code
var authenticationContext = new AuthenticationContext(_config.AuthString, false);
// Config for OAuth client credentials
var clientCred = new ClientCredential(_config.ClientId, _config.ClientSecret);
AuthenticationResult authenticationResult = authenticationContext.AcquireToken(_config.ResourceUrl,clientCred);
string token = authenticationResult.AccessToken;
The app is registered on Azure Ad and have all the permision ,
Im missing something? There is somewhere a working example?
I thinks is the same problem that is explained here
Live like you'll die tomorrow, learn like you'll live forever.
BlogGot this "nuclear bomb", as i call this type of unexpected issues, in response too.
{[x-ms-diagnostics, 2000010;reason="The access token is acquired using an authentication method
that is too weak to allow access for this application. Presented auth strength was 1, required is 2.";error_category="insufficient_auth_strength"]}
As i see, have to use a trusted certificate via ADAL (not self-signed), i guess, to get prtectio
level 2.
But all i initially was need - edit subject of an item at read-view outlook web (content) app... -
Hi,
I'm developing a C# application in Visual Studio 2013 Pro Update 2 to query an Exchange Online mailbox folder and read mails into my CRM solution. I can connect without a problem, read mails without a problem, mark individual emails as read without a problem,
etc. but I don't seem to be able to mark all emails in a specific folder as being un/read.
I can see that in Exchange 2013 that the following code would do the trick, but it doesn't work for Exchange Online:-
Folder folder = Folder.Bind(service,folderID);
folder.MarkAllItemsAsRead(true);
To mark an individual mail as being read I'm using this code:-
public void MarkAsRead(ExchangeService exchangeService, ItemId itemID)
Item mess = Item.Bind(exchangeService, itemID);
EmailMessage message = mess as EmailMessage;
message.IsRead = true;
message.Update(ConflictResolutionMode.AlwaysOverwrite);
Does anyone know if Exchange Online has a method to mark all mails as read and if so, how do I call it?
Thanks,
MikeI should probably say that when attempting to call the MarkAllItemsAsRead() method from my code I get the following error:-
"Microsoft.Exchange.WebServices.Data.ServiceVersionException was caught
HResult=-2146233088
Message=Method MarkAllItemsAsRead is only valid for Exchange Server version Exchange2013 or later.
Source=Microsoft.Exchange.WebServices
StackTrace:
at Microsoft.Exchange.WebServices.Data.EwsUtilities.ValidateMethodVersion(ExchangeService service, ExchangeVersion minimumServerVersion, String methodName)
at Microsoft.Exchange.WebServices.Data.ExchangeService.MarkAllItemsAsRead(FolderId folderId, Boolean readFlag, Boolean suppressReadReceipts)
at Microsoft.Exchange.WebServices.Data.Folder.MarkAllItemsAsRead(Boolean suppressReadReceipts)
at Renishaw.EWS.ExchangeWebService.GetEmails(ExchangeService service) in c:\pvcs_gotdotnet\work\CRMEmailProcessing\CRMEmailProcessing\EWS\ExchangeWebService.cs:line 89
at Renishaw.CRM.Service.EmailManager.ReadEmails() in c:\pvcs_gotdotnet\work\CRMEmailProcessing\CRMEmailProcessing\Service\EMailManager.cs:line 122
InnerException: " -
Hi guys,
Title covers largely what I'm trying to do. I'm trying to create an app in Android Studio that uses the Office365 for Android API (https://github.com/OfficeDev/O365-Android-Start).
In this app i want to bind calander events to Locations that i create in Exchange online. Is this possible? If so, how? Have not been succesful in finding in any information on the issue so far.
At the moment when the user wants to create an event, the user just types in the "location", but this is just a string and not bound to anything. I would prefer to get a dropdown of all the room resources I have on Exchange and that this will make
that the location. This to prevent 2 seperate meetings happening in the same room at the same time.
(Was sent here from the O365-forums, so sorry if this is a misplaced post)
Thanks for any and all help.
MathiasSo then I'm guessing you want to be able to retrieve the list of resources in the address book? If the Exchange admins have configured room lists, you could use those:
https://msdn.microsoft.com/EN-US/library/office/dn643730(v=exchg.150).aspx. -
Search feature in outlook only returning "no results" all of a sudden. Why?
I use outlook for my mail. all of a sudden, the search feature just returns a "no results" solution. Any ideas why?
Options > Privacy = un-check '''Permanent Private Browsing Mode'''
-
I just notice that talking to Office365 Exchange Web Services at https://outlook.office365.com/ews/exchange.asmx I get this in my SOAP response header:
<Envelope>
<Header>
<ServerVersionInfo MajorVersion="15" MinorVersion="0" MajorBuildNumber="1049" MinorBuildNumber="23" Version="V2_22"/>
</Header>
This means that the Version 'schema version' property (http://msdn.microsoft.com/en-us/library/exchangewebservices.serverversioninfo.version%28v=exchg.150%29.aspx) now breaks the pattern of versions that we had earlier: Exchange2007, Exchange2007_SP1, Exchange2010,
Exchange2010_SP1, Exchange2010_SP2, Exchange2013
In the schema files I found through Google (searching for <xs:simpleType name="ExchangeVersionType">) I could not find anything later than <xs:enumeration value="Exchange2013"/> (e.g. at http://msdn.microsoft.com/en-us/library/ee237685%28v=exchg.80%29.aspx)
If I do a SOAP request with this "V2_22" string, I still get valid answers.
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
<soapenv:Header>
<typ:RequestServerVersion Version="V2_22"/>
</soapenv:Header>
But it now looks as if the returned Version is no longer a reliable way to determine the Exchange server version. If V2_22 is not documented anywhere, who says it will not suddenly change to V2_23 tomorrow?
Question: Does this mean I will now have to change my version detection code to look at MajorVersion and then maintain a cross reference between MajorVersion and ExchangeVersionType **myself**? That is horrible: another dependency to maintain
is another potential code break.
As an aside: Note that the "Exchange Server Updates: build numbers and release dates" at http://technet.microsoft.com/en-us/library/hh135098%28v=exchg.150%29.aspx is no longer up to date, it does not mention the 15.0.1049.23 that my XML just returnedWhat really matters in EWS is the SchemaVersion as that will tell you what operations you can and can't use. From 2010 on you can use AutoDiscover to find what SchemaVersions are supported which is the best way to do version detection. eg
AutodiscoverService adAutoDiscoverService = new AutodiscoverService(ExchangeVersion.Exchange2010);
adAutoDiscoverService.Credentials = ncCred;
adAutoDiscoverService.EnableScpLookup = false;
adAutoDiscoverService.RedirectionUrlValidationCallback = adAutoDiscoCallBack;
adAutoDiscoverService.PreAuthenticate = true;
GetUserSettingsResponse adResponse = adAutoDiscoverService.GetUserSettings("[email protected]", (new UserSettingName[1] { UserSettingName.EwsSupportedSchemas }));
if (adResponse.Settings.Count >= 1)
String schemas = (String)adResponse.Settings[UserSettingName.EwsSupportedSchemas];
I would be careful using the Major build going forward if you have a look at the requests in OWA in Office365 you'll see they are using version 16 in cookies etc
Cheers
Glen -
I have an Outlook add-in that creates appointments to a load of Office 365 calendars. It used to work well but suddenly I have hit a problem.
The basic calling code is
Appointment appointment = new Appointment(exchangeService);
appointment.Subject = subject;
appointment.Body = body;
appointment.Location = location;
appointment.IsAllDayEvent = allDay;
appointment.LegacyFreeBusyStatus = LegacyFreeBusyStatus.Busy;
appointment.IsOnlineMeeting = false;
appointment.Save(SendInvitationsMode.SendToNone);
This still works fine on my own Office 365 mailbox but if I switch to another, using Impersonation, the Save line now throws the error "Set action is invalid for property."
There does not seem to be a problem with impersonation. The line
exchangeService.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, selectedUserEmail);
runs OK and afterwards the exchangeService's ImpersonatedUserID gives the correct email address.
If I look at the appointment object in the Watch window immediately after the line that creates it has run I can see that most of the properties have an entry like:
appointment.AdjacentMeetingCount' threw an exception of type 'Microsoft.Exchange.WebServices.Data.ServiceObjectPropertyException'.
Also, several properties including Subject are not listed in the expanded appointment object in the Watch window.
However, entering appointments.Subject explicitly in the Watch window does give the correct result.
I have used the floating watch to check the value of each property straight after it is set and each one is as expected.
I am at a loss as to what to check next and would be grateful for all ideas.
Mike VEThanks for the reply Jason. I did as you suggested and found that it was the IsOnlineMeeting that caused the problem. Once that was commented out everything worked as expected. On checking I see that this property is ReadOnly for everyone except the
organizer of the meeting. Clearly the Impersonate role is not regarded as the organiser.
I don't think it is going to matter so long as the user in whose calendar the appointment is created has fully access to the appointment, which seems to be the case.
Thanks for your help.
Mike VE -
Hello,
I'd like to move emails in the Inbox to a separate folder based on their category.
I'm using Microsoft.Exchange.WebServices (15.0.0.0) to connect to an ExchangeVersion.Exchange2013_SP1 instance. I'm using C# in VS2013 and the .NET 4 framework but can take examples from other versions if they exist.
I've tried using SearchFilter without much success through ExchangeService.FindItems, but the 'Categories' property seems to be tricky to configure.
Does anyone have an example of how I can select/move emails from a folder based on their category membership?
Thanks,
MikeIt should work okay what matters is what's stored in the Keywords property eg
The only other thing that would be important would be that Indexing is working okay in Exchange as this query relies on the Indexes (eg check your event logs on the server to make sure you not getting any indexing errors).
One thing you can do to test this is use the EWSEditor
http://ewseditor.codeplex.com/once you have connected right click the folder when the Items are located and select Search from the menu. Then using the AQS option try running some queries against the folder try the Conical version(which is what I gave
you) and the non conical Category:Clare . If it works okay in the EWSEditor but not in your code then you have an issue somewhere else in your code. I would also do the simple thingss like try then with a new message you send yourself as it maybe something
to do with Items not being indexed in the past etc.
Cheers
Glen -
Line-In 3 not available when speaker system set to 7.1 (Audigy 4 Pro)
I have just upgraded to the latest Audigy 4 Pro drivers. After the installation, I can not find the line-in 3 option on the mixer panel any more. This is only when my speaker system is set to 7.. However, if I change it to 2., 5.... etc, the Line-In 3 mixer appears in the panel. I'm stuck, I have read through the forums, searched the web but can't seem to find a fix for this.
Any ideas? Thank you for your help.
Best RegardsI've been trying to figure this out all night, still can't find anything even after tons of google searching. I'm worried I'm going to have to buy a midi / xlr interface to do the job right, even though this was advertised as a device perfect for musicians (we couldn't expect both a Left and Right input at the same time?).
If someone could please get back to me I'd really appreciate it. -
Server not available when trying to set up yahoo mail account
I keep getting a "service not available message when I try to set up my yahoo mail account
Have you looked at this previous discussion that is marked as correctly solved:
Keep getting "server unavailable" when setting up yahoo mail. Other mail sets up with no problem. Just yahoo with issues -
When trying to set up sync, why does it always tell me invalid email address?
I've downloaded Sync, I registered and signed up for Firefox add-ons.
When I try to set up Firefox Sync.. I type in my username, password, then when it comes to email address, whatever letter I type first a red/white X box comes up saying invalid email address. Why?telliot, your reply is a bit cryptic, but I finally understood what you meant. What he/she meant, folks, is to keep on typing what you know to be your valid email address. When you enter ".com" (or whatever extension) the error signal will disappear
Maybe you are looking for
-
I'm having a problem with animated GIF transparencies and photoshop. We've been having "halo" problems with some of our rendred images (transparencies) so I've been testing all of the animated GIF's in photoshop after compling them in Fireworks. The
-
Videos in my iphoto I can't see
Help! When I uploaded my pics and short videos from my camera to my iphoto, which it automatically does, the videos show up with a blank screen and I cannot see them. I tried to move them into quicktime but it wouldn't play. Only a white screen. They
-
When will the next ESR release be available?
Hi - I am writing some GUI based code and plan to release towards the end of the year. I imagine that a new FF ESR will be available by then. When will the new version of FF ESR be available so I can try and ensure that we test our GUIs using it? Tha
-
IWeb crashes when I try to upload since updates on 11/12/09
I get the following error message when trying to upload my web pages to MobileMe from iWeb: iWeb quit unexpectedly while using the SFWordProcessing plugin. When I go to More Details, I see: Exception Type: EXCBADACCESS (SIGSEGV) Exception Codes: KERN
-
Dear Experts, I am new to the SAP ME SDK developement.I need to create a UI which has a dropdown of all materials. I am struggling to get all Material list from the ME database.I know the steps to create custom UI in ME using SDK and I am looking for