Not able to get room's event which is created by other users. in graph Api.

Sachin S Vernekar 1 Reputation point
2022-11-07T16:18:49.23+00:00

Hi Team, It is really nice to have work with MS Graph API.
We are using this apis for our product.

Actually we need to get the All rooms of a User and assosiated events of the rooms.
We are able to fecth the rooms. but we are facing few issues with events.

Our requirnment for events is we have to fetch all the events w.r.t one room irrespective of who has created the events.
Currently we are getting the events which are created by me.

NOT GETTING EVNTS OF A ROOM CREATED BY OTHERS

FYI we are using auth flow with the below url

https://login.microsoftonline.com/tenatId/oauth2/v2.0/authorize?client_id=clientID&response_type=code&redirect_uri=redirectUrl&response_mode=query&scope=offline_access%20user.read%20mail.read%20places.read.all calendares.read&state=12345

and we are using below url to fetch the events

https://graph.microsoft.com/v1.0/me/calendarView/?select=id,subject,start,end,location,organizer,originalStartTimeZone&orderby=start/dateTime&filter =isCancelled eq false &top=100&endDateTime=endDateTime&startDateTime=startDateTime

Please let us know if there is any different api to fetch the rooms related all events with the token which we are getting with the above login flow.
Or please send the events of all rooms of that user in the same Api.

We need this issue to be fixed ASAP.

Thanking you
Sachin S Vernekar

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,297 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sachin S Vernekar 1 Reputation point
    2022-11-07T19:31:20+00:00

    We can use the below Api for the above requirnment

    https://graph.microsoft.com/v1.0/users/"room_email_id"/calendar/calendarView.

    "room_email_id" should be replaces with actual value

    Thanking you

    0 comments No comments

  2. Zehui Yao_MSFT 5,821 Reputation points
    2022-11-14T10:51:57.967+00:00

    Hi @Sachin S Vernekar , welcome to the forum!

    Great to know that it works now and thanks for sharing the update here.

    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others.". and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:

    [Not able to get room's event which is created by other users. in graph Api.]

    Issue Symptom:
    When request microsoft graph api https://graph.microsoft.com/v1.0/me/calendarView endpoint, it only returns the event created by logged-in user. But the requirement is to fetch all the events w.r.t one room irrespective of who has created the events.

    Current status:
    This issue has been solved by using the endpoint https://graph.microsoft.com/v1.0/users/"room_email_id"/calendar/calendarView.

    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community members to see the useful information when reading this thread. Thanks for your understanding!

    0 comments No comments