Graph API List Calendar View 404 - ErrorFolderNotFound for most calendars

Daryl Valdez 1 Reputation point
2021-12-13T05:44:06.14+00:00

We're trying to retrieve booking information with:
GET: https://graph.microsoft.com/beta/bookingBusinesses/{id}/calendarView?start={dateToday}

It works for 2 of our calendars (200 success response).
but for our other 7 calendars, it returns 404 error:
![![157042-image.png

We tried the v1.0 version of graph api (https://graph.microsoft.com/v1.0/users/{id}/calendarView?StartDateTime=2021-12-13&EndDateTime=2021-12-13), and still the same 404 error results for those same 7 calendars:
156960-image.png

and still works for the same 2 calendars:
156997-image.png

We have the following permissions granted:
156988-microsoftteams-image-1.png

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JanardhanaVedham-MSFT 3,566 Reputation points
    2022-01-25T14:02:29.983+00:00

    Hi @Daryl Valdez ,

    Sorry for the delyed response. I am able to replicate this issue in Graph Explorer or Postman API tools with the delegated scope/permissions. You were getting this 404 error because the delegated user that you are using do not have the access to other user's calendar.

    You can consider any of the below two solution options to resolve this issue :

    1. Register an app in azure AD and grant Calendars.Read permissions with the admin consent. Use Microsoft Graph Calender API in your application by acquiring a valid application access token. Example : Output screenshot of using Calender View API with application permisions in Postman API tool.

    168332-image.png

    2.If you want to use delegated scope/permissions then ensure that the other user's calender is shared with the required delegated user and enure that "Calendars.Read.Shared" deletgated permissions are granted. Exchange Online administrators can also bee able to grant the permissions on user's mailboxes from Exchange Online Admin Center as well. You can refer this Q&A post for more information on this.

    168341-image.png
    168324-image.png

    Example: Output of Calender View API from Graph Explorer with delegated permisions : "Calendars.Read.Shared"

    168342-image.png

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it ,so that it will be helpful to the other community users. If you have any further questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.