exchange-server


EWS create event with original organizer


We are trying to create event using EWS which is a part of the migration code. There is a well know issue where we cant set the organizer of event which is the orginal one, here is scenario;
User A is being migrated to User B
User A has 30 events in Calendar
Out of those 30, it has 20 invited events where A is attendee and 10 events which is created by user A (i.e. user A is organizer)
When we migrate them over, using below code all the events are created with User A as organizer. Which is the real issue
Appointment appointment = new Appointment(exchangeSevice);
appointment.MimeContent = new MimeContent("UTF-8", System.IO.File.ReadAllBytes(#"c:\A\test.mime"));
//appointment.MimeContent = ;
// Set the properties on the appointment object to create the appointment.
appointment.Subject = "Tennis lesson with invite 22222";
appointment.Body = "Focus on backhand this week.";
appointment.Start = DateTime.Now.AddDays(2);
appointment.End = appointment.Start.AddHours(1);
appointment.Location = "Tennis club";
appointment.ReminderDueBy = DateTime.Now;
Attendee attendee = new Attendee("test#user.com");
appointment.RequiredAttendees.Add(attendee);
Mailbox mailbox = new Mailbox();
mailbox.Address = "student#test.com";
// Save the appointment to your calendar.
appointment.Save(new FolderId(WellKnownFolderName.Calendar, mailbox), SendInvitationsMode.SendToAllAndSaveCopy);
// Verify that the appointment was created by using the appointment's item ID.
Item item = Item.Bind(exchangeSevice, appointment.Id, new PropertySet(ItemSchema.Subject));
Issue is explained here by Microsoft;
https://blogs.msdn.microsoft.com/webdav_101/2011/09/28/howto-set-the-organizer-of-a-meeting-on-the-calendar-of-an-attendee-using-ews/
I am not sure what exactly this paragraph is trying to say;
If you decide to create the meeting using MIME, have the MIME/VCALENDAR content use METHOD:PUBLISH instead of REQUEST. The problem with this is that there are other properties which need to be set. There is no documentation or recommendations on what all would need to be set or if methodology might work in all cases. Further, you might get it to work reliably for now, however it may not work as expected in future updates to Exchange.
Can anyone help on how do I achieve my requirement of create event with different organizer? Is there any chance I can do so?
What you are doing is not migrating the appointments, but creating new ones.
The property "organizer" is read-only and can't be changed, so you will not succeed this way.
What I'd try is to get the organizers of the appointments from User A, impersonate those (or using delegate access) and send an invitation to User B.
Hot to impersonate another user: https://msdn.microsoft.com/en-us/library/office/dd633680(v=exchg.80).aspx
Hot to get delegate access: https://msdn.microsoft.com/en-us/library/office/dn641957(v=exchg.150).aspx
Which is what exactly I was thinking. But in that case, the only fear customer has expressed is that the invitation will boom in their inbox. So assume today is 20th Jan 2017 and there is an event of 15th Jan 2015 which is BACK DATED one. In that case I just cant send invite.
ALso, the other issue is its not necessary that ONLY internal employees are invited. There could be external ones as well who will start getting invite mails. If you see what I mean. So this solution cant work.
What I was hoping was if there is any way I can create programmatically MeetingRequest which TOO isnt possible but if I could create a MIME of MeetingRequest item and save that in inbox. Because what I noticed that if I get event invite, thats being shown in calendar. Obviously that way we cant copy the status whether the user accpeted that or not but atleast this can be a solution. Any suggestion?

Related Links

Error Updating Extended Properties for a meeting via EWS Managed API
Request failing when I try to send mail to Exchange Server using Exchange Web Services
Trying to Delete a Contact PhysicalAddress results in ErrorSchemaValidation Response
How to retrieve all contacts from Microsoft Exchange using EWS Managed API?
Restore deleted emails Exchange Purges folder EWS
Exchange transport agent libraries license [closed]
How to enable Mailbox audit log in Exchange hybrid Environment
How to get all information from Global Address List (GAL) from Microsoft Exchange, using EWS Managed API?
Listing all current events using EWS Managed API
how to get one's distribution group of lync
EWS Managed API 2.2 Read\Write extended properties of attachments
Search-Mailbox cmdlet in Exchange 2013
Exchange On Premise and Exchange Online Authentication
Impersonate room in EWS
php-ews send calendar invitation
Syncing Multiple SubFolders in Exchange Web Services

Categories

HOME
amazon-web-services
webview
keyboard
windows-8.1
applescript
devexpress
compilation
activemq
portable-class-library
fogbugz
qooxdoo
apache-kafka-connect
drag-and-drop
video-streaming
mithril.js
wagtail
sharepoint-online
roku
lc3
jquery-select2-4
squirrel-sql
sonata
android-contacts
libgit2
tableview
el
chronicle-queue
dragula
echosign
locks
autodesk-model-derivative
listjs
adminer
autoencoder
orchardcms-1.8
des
textmate2
best-buy-api
export-to-pdf
utf
newtons-method
flipkart
coverage.py
httphandler
intellij-lombok-plugin
sony-future-lab-n
beeline
jgrapht
freshdesk
android-mediarecorder
ptvs
connect-direct
wikimapia
email-forwarding
maatwebsite-excel
rational-performance-test
pjax
s-function
cdo.message
bbc-micro
management-studio-express
voronoi
enunciate
bayesglm
ruby-on-rails-4.1
asp.net-web-api-helppages
apple
google-gdk
python-c-extension
maven-shade-plugin
fat32
uno
lifetime
ecos
category-theory
discovery
pacman
sly-scroller
oembed
ntlmv2
tridion-2011
semantic-merge
multiscaleimage
jdom
memory-pool
winsxs
jquery-1.4
3-tier
odac
icicles
objectinstantiation
code-camp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App