Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Backup and restore calendar permissions #5051

Open
meain opened this issue Jan 17, 2024 · 0 comments
Open

Backup and restore calendar permissions #5051

meain opened this issue Jan 17, 2024 · 0 comments

Comments

@meain
Copy link
Member

meain commented Jan 17, 2024

  • 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"
            }
          }
        ]
      }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant