Office 365 Calendar Id changes - microsoft-graph-api

We are experiencing that ids of calendars created using MS Graph sometimes changes. The calendars are created using a POST request to /me/calendars, and the id of the returned calendar object is stored in our database so that we can synchronize with the calendar later. Unfortunately sometimes we see that the id of the calendar in the users Outlook account has changed later the same day. We are using the immutable id header in all requests.
It looks like this problem (or similar problems) has been reported multiple times on SO:
microsoft graph API /calendars id is not unique
Office 365 default Calendar's ID changes automatically
Why would a Calendar Id change when using the Outlook REST API?
but I can't see from the answers what the solution is, or if MS was able to fix a bug.
Any update on this issue would be appreciated.

When I encountered this problem, I solved it by using Microsoft 365 groups and their default calendars to ensure an immutable id that you can access from no matter what user and adding/removing members to manage the permissions.
For us we also had this problem, that in microsoft graph api the calendar id(that was created by user A) is different for user A and B for the following request, as it is a base64 encoding of something:
/users/user-id/calendars
More about the graph api groups you can find here.

Related

how to update user role in online meeting using graph API

1.How to change the user role in ongoing meeting using graph api. When I open the development tools found that teams is using updateParticipantRole API, is there relevant graph API reference.
How the client know about the updated role either need to use event subscription and sending push notification to it?
Example: https://api-apac.flightproxy.teams.microsoft.com/api/v2/ep/conv-jpea-04.conv.skype.com/conv/sBfcIh3Hj0S0dBdxT5yswQ/updateParticipantRole?i=14&e=638031087785315185
I tried to update the online meeting but there must be an API to update meeting role alone which is used by teams itself.

create a calendar event for a whole team ( participants) using the graph api

Is it possible to create a calendar event for a whole team using the graph api? Right now, the calendar is coming only in the logged in/organizer account through which the event/meeting is being created But, I want to have this feature for every users/attendees/participants in their calendars. If it is not possible, then, can a separate meeting invite be sent to every users in the attendees list to accept the event/meeting so that they can be notified about the event which has been created and which they need to attend.
You can create Microsoft 365 group of users and use below API to create event.
POST /groups/{id}/calendar/events
The calendar can be one for a user, or the default calendar of a Microsoft 365 group.
Ref Doc: https://learn.microsoft.com/en-us/graph/api/calendar-post-events?view=graph-rest-1.0&tabs=http

MS Teams Online meetings - email notifications

We are trying to use MS Graph API 1.0 (endpoint https://graph.microsoft.com/v1.0/me/onlineMeetings) to create online meetings for our customers.
Everything works fine and the meeting is created but participants (and organizer too) never received any email notifications about upcoming meetings.
Is there any configuration we need to enable for this?
Thanks.
When you create any onlinemeetings it doesn't show up in user calendars, as this is by-design. I am not aware of any other settings/parameters available and its documentation doesnt talk about that as well.

Accessing and creating Teams Chats via Graph API

I'm going over the Microsoft Teams section of the Graph API and trying to find out how to do two things:
Create a new chat, giving it a topic that correlates to an entity in our app (essentially creating a chat around an entity), invite specific users into it, and send messages to the chat.
Access the currently logged-in user's private chats, filtered by their topic, and show their contents inside our app.
For #2, it looks like it should be possible using beta endpoint of the Graph API, but I get 403 Forbidden errors both in the Graph Explorer when trying to access https://graph.microsoft.com/beta/me/chats, and in my own app, after enabling the Chat.Read permissons for it.
For #1, it looks like the API doesn't officially support creating new chats at all.
Is there any approach we can use to create and manage chats? Is there an alternative, perhaps not MicrosoftGraph-based API?
as you mention, the ms graph doesn't yet support initiating group chat. You would use the MS Bot Framework for this: https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bot-conversations/bots-conv-proactive
I see the docs on these Chat api do exist, but they are not present in the Graph Explorer. I tired testing them in the OfficeApiEditor tool with a v2.0 App Registration and Delegated permissions (Chat.Read) and i get this:
Failure - Status Code 500
"code": "InternalServerError",
"message": "Error while processing response.",
so maybe it will take some time before they are really available in beta.
In MS teams, there is a api called ChatMessage to post a message to a chat(only if the chat already exist or started). But, there is no api to create/start a new chat. I have raised a feature request. Do vote for this to suggest this idea to Microsoft.
https://microsoftteams.uservoice.com/forums/913786-microsoft-teams-free/suggestions/38776681-it-would-be-awesome-l-if-there-is-an-api-functiona

Sharing a calendar with another user via the Microsoft Graph API

I'm working on an application that does OAuth authorization on behalf of multiple users. My application wants to be able to create a calendar for user A and then share that calendar as read only to user B. It will then create events on that calendar so that they appear for user A as read/write and for user B as read only.
Obviously the Microsoft Graph API supports creating a calendar and putting events on it. My question pertains to the sharing part.
Does the Microsoft Graph API (or the Outlook 365 REST API) support sharing a calendar from one user to another user? I wouldn't want user B to receive the typical email that announces that user A shared a calendar with them. After creating the calendar under user A's account, I'd want to use user A's credentials to set up the sharing permission to user B. Then I would use user B's credentials to add the shared calendar to their list of calendars so that they see it in the Outlook 365 calendar interface.
I've read through a lot of the documentation and have been playing around with a prototype, but I can't find where this use case is supported.
I'm afraid this isn't possible to do via Microsoft Graph. The scenario seems reasonably straight forward, I recommend visiting the UserVoice and adding this suggestion.

Resources