Inquiry about subscribing to room events in resources using Microsoft Graph API

Jay Hsueh 20 Reputation points
2024-07-24T12:27:00.1433333+00:00

I am writing to seek clarification regarding the use of Microsoft Graph API to subscribe to events for rooms listed under resources.

I have already attempted to use the API endpoint https://graph.microsoft.com/v1.0/subscriptions with the following payload:

{
	"changeType": "created,updated,deleted",
	"notificationUrl": "https://webhook/",
	"resource": "users('{room_email}')/events",
	"expirationDateTime":"time",
	"clientState": "secretClientValue"
}

But I got the error like

{
 "error": {
	"code": "ExtensionError", 
	"message": "Operation: Create; Exception: [Status Code: BadRequest; Reason: The value 'https://outlook.office365.com/api/v2.0/Users('room_email')/Events' of parameter 'Resource' is invalid.]", 
	"innerError": {
		"date": "...", 
		"request-id": "...", 
		"client-request-id": "..."
}}}

Despite this attempt, I'm still encountering issues. Therefore, I would like to know:

  1. Is it possible to use Microsoft Graph API to subscribe to events of a room that is listed under resources?
  2. If yes, is the format I'm using for the 'resource' parameter in the subscription request correct?
  3. Regarding permissions, I currently have Calendars.Read.Shared, Calendars.Read, and Place.Read.All. Are these sufficient, or are there any additional permissions required for this operation?
  4. Is there any difference in the API call or process when subscribing to a resource room's events compared to a regular user's calendar events?
  5. Can you provide an example of a correct API call for this scenario, including any necessary headers or additional parameters?
  6. If my current approach is incorrect, could you please provide guidance on the proper method to subscribe to resource room events?
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,289 questions
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 6,575 Reputation points Microsoft Vendor
    2024-07-25T02:22:05.05+00:00

    Hi @Jay Hsueh

    According to the documentation, the Graph API currently does not support subscribing to room events, only all events in a user's mailbox, as shown below:

    User's image

    Hope this helps.

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

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.