Outlook - Copy group calendar events to user outlook calendar - outlook

We have a recurring event setup in Office 365 group calendar. If a new member is added to this group, that member can see the event in "Group" calendar and in order to see this event in main calendar, user have to click on "Copy to My calendar" in group event.
Is there any way to do this via code/script? Basically achieve "Copy to My calendar" for Office 365 group calendar to User's main calendar via code.

I'm not sure when you click "Copy to my calendar" if it has some smart link or if it is just a copy at a point in time.
You could subscribe to the calendar using a webhook. That webhook would call your API hosted somewhere (an Azure Function, a web api hosted on Azure App Service). Your API would recieve the event id, it could then fetch the full details of the event and then create a new event on the users calendar.
I'm assuming that you'd want this to create it on all users calendar and also to update it if there were changes on the source event.
Its complex for sure doing it this way.
https://learn.microsoft.com/en-us/graph/webhooks
https://learn.microsoft.com/en-us/graph/api/resources/event?view=graph-rest-1.0

Related

Organizer does not receive email notification when attendee declines the event

We use a service account to authenticate google calendar and programmatically create calendars and appointment events. However, when a customer declines an event, there's no notification whatsoever of the decline and we cannot find any email regarding the decline in the admin or organizer's email inbox. is it because the service account is a dummy user? How can we get the organizer to be tied to an actual email account so people can get notification of the response status of the attendee?
We tried
create the calendar and event programmatically, attendee declines, no notification (despite setSendNotification("all") in the API call)
create the calendar and event programmatically, move the organizer to a different calendar (new organizer), attendee declines, no notification for the new organizer (despite setSendNotification("all") in the API call)
update code
googleAPIHelper.executeWithThrottling(service.events().update(calendarId, remoteEvent.getId(), remoteEvent).setSendUpdates("all"), Event.class);
insert code
googleAPIHelper.executeWithThrottling(service.events().insert(calendarId, eventToInsert).setSendUpdates("all"), Event.class);
move organizer code
googleAPIHelper.executeWithThrottling(service.events().move(calendarId, remoteEvent.getId(), destinationCalendarId), Event.class);
As it turned out, for each calendar the organizer owns (found in "Other Calendars"), we have to toggle the "Other notifications" settings to receive an email (i.e. Event responses). The default is set to "None."
E.g.
See also: https://www.youtube.com/watch?v=wgbpsm82AaY

Edit Google Calendar "From" and "Organizer"

I want to create event via google calendar api using Go. I found out that the sender (From) is whoever responsible in client_id I provide in the google API, in this case me. Can I edit this sender, so that it is not sent from me? At least I can edit the display name of the sender, the email I think will always be my email
Also about editing the organizer, I tried to use move action but it only moves the event, not change the organizer. Is there other way to edit organizer?
To address your questions:
1. Can I create an event from another address?
What you want can be done by creating a service account and performing domain-wide-delegation
What is a service account?
A service account is a special type of Google account intended to represent a non-human user that needs to authenticate and be authorized to access data in Google APIs - in your situation the Calendar API.
After creating the above mentioned service account, you will have to perform domain-wide-delegation and impersonate a user in your domain in order to be able to create the event wanted.
Now, when writing the code for your application, you will have the use the credentials that were created for this account in order to authorize the requests.
OR
If you want to specifically edit only the display name of the creator of the event, you can perform an update request:
PUT https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId
And add in the request body this:
"creator": {
"displayName": "UPDATED DISPLAY NAME"
}
2. Can I edit the organizer?
According to the Calendar API Documentation:
organizer > The organizer of the event. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to True. To change the organizer, use the move operation. Read-only, except when importing an event.
Therefore, the organizer can be changed/updated only when importing the event in question.
Reference
Authorizing Requests to the Google Calendar API
;
Creating A Service Account;
Calendar API Events Resource;
Calendar API Events:Update.

Outlook Calendar: Add different calendar of same mailbox to an event

While creating an event in the outlook calendar, I want to add multiple calendars of the same mailbox in the event. I am not able to find any way of doing this.
I am using MS Graph for creating events on the calendar.
Please help me with this. Thanks in advance.
You can use Create event API to create a new event in a calendar. But you need to note that the calendar can be one for a user, or the default calendar of a Microsoft 365 group; it's not for the calendar group - so you can't add multiple calendars. Here's the doc.

How to set label for Hangouts Meeting via API

Background
I'm trying to create an appointment calendar using GSuite and Google Calendar API. When a user (no Google account and outside the GSuite organization) creates an appointment, I'm trying to create a Calendar event on the Calendar of an organization member via the Google Calendar API and generate a Hangouts meeting link.
Problem
I can create the event and the Hangouts meeting link, but I cannot create a custom label for the video link. I was able to make it slightly unique by adding an attendee with a fake email xczczf#example.com to John Doe's calendar to get a label of doe-j-xcz, but I would like full control over the label if possible.
Attempted Solutions That Didn't Work
Create the event and provide a conferenceData.createRequest and an entryPoint with the desired label.
Create the event first and then send a patch with the information described in 1
Changing the conferenceId
After messing around with the API Explorer, a custom label can be made by:
Creating the Cal event and adding a meeting link using a createRequest
Send a Patch with conferenceData.conferenceId set to the unique label value

How to change the event organizer on google calendar when creating an event?

I'm using the Google Calendar Api to create events, I'm trying to pass the parameter organizer with the email of the person that I want to be the owner but it is not working and the organizer it is always the same creator.

Resources