EWS Managed API: SendOnlyToChanged when changing attendee from Required to Optional - exchange-server

Scenario is this:
create appointment with 1 required attendee and save it -> attendee gets invitation
var app = new Appointment(service);
app.Subject = "Test";
app.RequiredAttendees.Add("attendee1#dummy.com");
app.Save(SendInvitationsMode.SendOnlyToAll);
move attendee from required to optional and update appointment with SendOnlyToChanged -> attendee doesn't get any notification
app.RequiredAttendees.Remove("attendee1#dummy.com");
app.OptionalAttendees.Add("attendee1#dummy.com");
app.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToChanged);
I know there are/were some issues with SendOnlyToChanged when attendees are added / removed (everybody got notifications) but we don't have this problem. But we have this lack of notifications about change of attendance type and I wonder if that's just how Exchange handles this?
I tried similar operation in OWA and it looks like attendee always gets notification when I click "Send updates" button so OWA is probably using SendToAll. When I added another attendee OWA asked if I wanted to send to all or just to added / removed so I suspect moving attendees between required / optional / resources is not considered as modification of attendees list.
Could somebody share some thought on this subject? Maybe somebody with more intimate (inside) knowledge of Exchange / EWS? Thing is that customer reported this as a bug and I'm almost sure that's just how Exchange works in this scenario but it would be easier to convince customer if I could produce any "official" resources to back me up.

This is most likely to do with the type of operations your trying to do, EWS doesn't support moving an attendee so you should be doing a Remove first and call an update which will commit the change (if you don't want notification use SendToNone). Then Add the attendee back with SendOnlyToChanged and call update. The thing to keep in mind is that the only time a request is made to the server is when you call Update.

Related

Logic Apps Email Trigger - Get original Alias

Found a very similar question here: Email aliases not returned as "To" address in logic app
TLDR: From within a logic app "When a new email arrives" trigger, How do I get the original alias that the email was sent to?
I have a logic app that creates a ticket based off an email sent to an outlook box. Now I want to be able to choose aspects of the ticket based off of whether or not the email was sent to the mailbox itself or an alias of the mailbox. The problem I'm having is that by the time logic apps gets a hold of the email, the alias address has already been replaced with the actual box's address ("alias1#place.com" -> "actualbox#place.com").
The actual mail in the inbox has the original email's alias information in the headers, but I can only get them by looking at the properties in outlook. I've tried to get the original "To" internetheader information both within logic apps (by exporting the email to blob storage and looking at headers there) and with the Microsoft Graph API. Sadly, the email exported by logic apps doesn't have the alias information and Graph API has pretty much every header but "To". At least one other person has lamented the lack of To
That said, the actual email still has the original alias information. Can someone help me get that information in logic apps without jumping through too many hoops? A many hoop solution is welcome if none other can be found though.
Use the Export email (V2) action from the Office 365 Outlook connector. This will give you the full message with original headers (including the actual To address)!
The flow here is, trigger on the incoming email, as you already are, then add the export email action providing the message id from that trigger to pull this specific email.
From there, you you'll have one big "body" property which you'll need to interrogate to find the To address.
Caveat on this though, it doesn't work when emails are sent between mailboxes in the same Office 365 tenant. Exchange Online will "helpfully" go, "I know that address... this is the address you wanted!"
What API are you using? In Outlook Object Model / MAPI / EWS, you need to retrieve the PR_TRANSPORT_MESSAGE_HEADERS MAPI property (DASL name http://schemas.microsoft.com/mapi/proptag/0x007D001F)
We arrived at a many hoop solution.
The "Primary" email box now has some rules that look at the internet headers mentioned above (Message -> Properties -> look for 'To:').
If it finds an alias there, it will put the email in a corresponding folder for each alias.
Then we have logic apps listening to each of the alias folders which will then send the email's information to the _Core logic app that does the actual processing.

How can I add appointment id/data to the link appended to the body of this appointment in Microsoft Exchange?

Just like in the title. I would like users using Outlook to be able to click a link in the appointment which will redirect them to the site with additional data about this meeting. This link should be available in a few seconds after creating this appointment, best immidiately. The link may contain either id to this meeting in Exchange or date, time and room.
Is it possible by using transport rules? I couldn't find anything relevant.
Second way to achieve it may be a service which will scan appointments and append relevant link, but it should work every few seconds and be fully reliable.
Any other way? I can't see anything in message/appointment headers :/
I would like to support Exchange versions from 2010 up to Online.

End Event on Room Resource calendar

The problem that I face: I currently use a product that displays calendar items on an iPad outside of conference rooms. I have all the room resources set up and everything works brilliantly except if I try to end the event early from this display.
The reason it doesn't end: When User A schedules a meeting and adds the room Conference Room as a resource, and Conference Room accepts, the meeting is still owned by the organizer, or in this case User A. Because of this, the room itself can not edit times on an event, only the organizer can.
The question: Is there any way, to have the Room auto accept the meeting, and also be able to edit the event?
Please note, I have tried this with Exchange 2007, Exchange 2010, Exchange 2013, and Office 365. The servers have been both on-premises and hosted.
No the only valid editor of a Meeting is the organizer for the reason that each copy of the meeting stored in the Attendees mailboxes is a separate item in the Exchange Mailstore. Eg Even if the Organizer modifies the appointment and doesn't send out Meeting updates the changes they make won't show on the attendees (or Room Mailbox) calendar until the updates are sent and accepted. This is fundamental to the way in which Appointments work if you need to change a meeting for some reason you may want to look at impersonating the Owner of the Appointment in EWS. The one thing the Room mailbox (or any attendee) could do is propose a new meeting time which would be a separate message that would sent back to the Organizer who then once they accepted would send out a normal Meeting update to all attendees.
Cheers
Glen

EWS : how to get notification when meeting starts/end in exchange 2010

I have to do some operation when meeting starts and end. But i not able to find anyway to get the notification from EWS when meeting starts and end.
I tried push subscribe and subscribe for folder ID "calendar" and then do GetItem to fetch the meeting information. But the problem with this approach is i have to store all meeting item with timing and have my logic(timer) to find when meeting is started and finished.
I realize this is an old post, but I happened across it and thought someone might still find an answer useful.
EWS notifications will not be of use in this case - the notifications that you can subscribe to only alert you to new mail, deleted, modified, moved, copied, and created items. There's nothing built in regarding notifications for start times of meetings.
So what I'd suggest is that you use the EWS FindItem operation with a CalendarView element to get all calendar items that occur for the next N hours, to determine what appointments are happening that day, and then create your own logic/timer to perform your operation at the appropriate time. Hope that helps.

Create Exchange Meeting Programmatically

Is it possible to create a meeting or appointment on someone else's Exchange 2010 account, without them needing to accept the meeting? Ideally, we want to have a delegate account, or similar strategy, to place appointments/meetings onto people's calendars. We want to bypass the normal request/accept model, and force these meetings into the calendar.
I looked at CreateItem() in the Exchange 2010 documentation, but it is unclear as to what happens once the method is executed. Does the user receive a normal invitation? We don't want that. We want a model where our system has full control over the users' calendars, without them receiving a traditional meeting invitation, and with automatic acceptance. I would prefer not to have to use VBA hacks or plugins, also.
I think it's possible in case of usage ApplicationImpersonation (the usage of ImpersonatedUserId). It 's important that you have to configure the Exchange first. Then you can set NetworkCredential use ImpersonatedUserId to direct access to the destination calender. See here for more information and the code example.
What I would do is grab a copy of MFCMapi (mfcmapi.codeplex.com), and then create a meeting request in a traditional way and send it to a couple mailboxes. Accept it in a couple, mark tentative in a couple, etc.
Take a look at the resultant calendar item created in the invitee mailbox. I expect you should be able to create the appointment and then set the necesary MAPI properties to make it appear as accepted. You can set the arbitrary properties with EWS, it's just going to take a bit of digging to figure out which ones to set. MFC Mapi is a good tool for that.
On the organizer side, you'll need to make some tweaks so it looks like everyone accepted.

Resources