MS Graph API - Fetch Resource Calendar meeting details using user's oAuth token

Saravana 161 Reputation points
2024-04-04T14:06:07.44+00:00

Our application uses Microsoft Graph API to sync MS 365 calendar using oAuth.

For user specific calendar, below API is being used to fetch data using their access token,

https://graph.microsoft.com/v1.0/me/calendarview

We have additional requirement to fetch meeting details for Room resources within the organization.

I tried using the below API url to fetch room resource's calendar information using MS365 admin's access token and it failed.

https://graph.microsoft.com/v1.0/room-email-id-here/calendarview

I see availability APIs for room resource, but couldn't find API for fetching calendar entries of a room resource.

Is there any API available to fetch the calendar events for the room resource using MS Graph and let me know the scopes required for those API.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,005 questions
Azure Startups
Azure Startups
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Startups: Companies that are in their initial stages of business and typically developing a business model and seeking financing.
258 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CharanyaB-MSFT 1,891 Reputation points Microsoft Vendor
    2024-04-09T00:55:55.2966667+00:00

    Hello @Saravana,

    Thanks for reaching Microsoft.

    Please use the below API format to fetch the calendar view of room resource:

    GET https://graph.microsoft.com/v1.0/users/{roomResourceID}/calendar/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime}

    API Reference link: https://video2.skills-academy.com/en-us/graph/api/calendar-list-calendarview?view=graph-rest-1.0&tabs=http#http-request

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


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.