0

My application uses the Microsoft Graph API to do some calendar events management. My app authenticates as the user and so acts on the user's own calendar only.

The feature I am working on requires me to re-instate a previously deleted event for which the user was an attendee (not the organizer). I have an archived copy of the event and all its details.

When I use the Create Event endpoint, the server ignores whatever I set as organizer and isOrganizer and always forces the calendar owner to be the organizer. This is a problem of course because the user was just an attendee and I need the re-created event to reflect that. Furthermore, the server will unfortunately send out invites from my user to the other attendees when I re-create the event.

Given an initial (deleted and archived) event that looks like this (removed some keys):

{ "attendees": [ { "emailAddress": { "address": "_ORGANIZER_EMAIL_", "name": "_ORGANIZER_NAME_" }, "status": { "response": "none", "time": "0001-01-01T00:00:00Z" }, "type": "required" }, { "emailAddress": { "address": "_USER_EMAIL_", "name": "_USER_NAME_" }, "status": { "response": "none", "time": "0001-01-01T00:00:00Z" }, "type": "required" } ], "body": { "content": "_HTML_CONTENT_", "contentType": "html" }, "bodyPreview": "_TEXT_PREVIEW_", "[email protected]": "https://graph.microsoft.com/v1.0/users('_USER_EMAIL_')/calendars('_USER_CALENDAR_ID_')/$ref", "[email protected]": "https://graph.microsoft.com/v1.0/users('_USER_EMAIL_')/calendars('_USER_CALENDAR_ID_')", "isOrganizer": false, "organizer": { "emailAddress": { "address": "_ORGANIZER_EMAIL_", "name": "_ORGANIZER_NAME_" } } } 

I tried to re-create the calendar event by hitting (omitted some fields):

POST users/_USER_EMAIL_/calendar/events { // These two fields are completely ignored "isOrganizer": false, "organizer": { "emailAddress": { "address": "_ORGANIZER_EMAIL_", "name": "_ORGANIZER_NAME_" } } // Trying to force-set organizer, taken from this answer to a very similar Q // 2 years ago: https://stackoverflow.com/a/76354749/3977061 "singleValueExtendedProperties": [ {"id": "String 0x0042", "value": "_ORGANIZER_NAME_"}, {"id": "String 0x0065", "value": "_ORGANIZER_EMAIL_"}, {"id": "String 0x0064", "value": "SMTP"}, {"id": "Boolean {00020329-0000-0000-C000-000000000046} Name urn:schemas:calendar:isorganizer", "value": "false"} ] } 

No matter what I do, the server will not allow me to properly set the original organizer. The response has conflicting keys

{ ... "isOrganizer": true, "organizer": { "emailAddress": { "address": "_ORGANIZER_EMAIL_", "name": "_ORGANIZER_NAME_" } }, } 

So organizer is correct because of the singleValueExtendedProperties setting; however, isOrganizer suggests that my user is still the event organizer. On my user's calendar, it says "You're the Organizer", and invites are sent out as if the user just organized the event.

I'm trying to find out basically how can I import an event and set an external organizer.

Alternatively, is there a way to tell the server to not send out notifications to attendees when I re-create the event?

Related Questions:

1 Answer 1

0

\>>Alternatively, is there a way to tell the server to not send out notifications to attendees when I re-create the event?

This has been a much requested feature especially as its something you can currently do with EWS (which is going away next October) but nothing has yet manifested anywhere to do this in Graph.

If this is a new feature your working and you may have the flexibility to do this if you had stored the old calendar event as an export via https://learn.microsoft.com/en-us/graph/mailbox-import-export-concept-overview you can then just reimport and restore the calendar appointment via the import API and you won't have any issue with organizer or notifications. You need to have the FTS format for this to work so it won't work from say an existing json or ical representation of the appointment.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.