'How can I retrieve the url for an Outlook Calendar?
Is there any way of accessing a calendar in MS Outlook via a hardcoded url? Suppose I have 3 calendars (A, B, C), can I via a url access only A? Any way of doing this without publishing the calendar first? (This is possible for Google Calendars)
I've also been playing with graph api
, but was unable to find something similar to a weblink that points to the calendar (yes, there is a weblink for specific event items).
Thanks in advance!
Solution 1:[1]
TD;DR
As frustrating as it is it seems the only way to accomplish this is only by creating a group and accessing the default calendar of that group. In that case the group id is the same for all the users and by pointing at the default calendar it actually accomplishes what you need.
Explanation
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
Why? I understood that it's related to the legacy of calendars being actually folders.
So in order to have the same functionality with graph api that google has with shared calendars, you will need to use groups and their default calendar because of the arguments below:
- The small solvable problem is that the calendar id is different depending on the user that makes the request(owner vs others), but that could be solved with unique name and filtering by name, which yes is not great because implies more requests.
- The big problem(at least for the product I'm working on) is that you can grant permissions from graph api to calendar programatically only to default calendars of users or groups. So by using groups and adding members to it, the permission part is solved by api itself, and everyone in the group will have access to the default calendar of the group.
So I suggest to use 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. More about the graph api groups you can find here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |