This repository was archived by the owner on Oct 11, 2024. It is now read-only.
This repository was archived by the owner on Oct 11, 2024. It is now read-only.
Backup and restore calendar permissions #5051
Open
Description
-
Calendars have
calendarPermission
as a relation and we are not currently backing up that information. -
Beta API has
isShared
filed which could be used to figure out if the calendar has been shared and decide if we should make another request to get the permissions -
According to docs, we can fetch calendar permissions via
GET /users/{id}/calendar/calendarPermissions/{id}
, but giving a 500 error when trying to fetch it. The 3rd option to fetch by item id was also giving an error.{ "error": { "code": "ErrorInternalServerError", "message": "An internal server error occurred. The operation failed." } }
-
We can however get user's primary calendar permission(just the primary cal) via
GET https://graph.microsoft.com/:version/users/:user/calendar/calendarPermissions
- Example available in docs
- When not shared with anyone, the user calendar has the following
{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('JohannaL%4010rqc2.onmicrosoft.com')/calendar/calendarPermissions", "value": [ { "id": "RGVmYXVsdA==", "isRemovable": false, "isInsideOrganization": true, "role": "freeBusyRead", "allowedRoles": [ "none", "freeBusyRead", "limitedRead", "read", "write" ], "emailAddress": { "name": "My Organization" } } ] }