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:
- Is it possible to use Microsoft Graph API to subscribe to events of a room that is listed under resources?
- If yes, is the format I'm using for the 'resource' parameter in the subscription request correct?
- 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?
- 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?
- Can you provide an example of a correct API call for this scenario, including any necessary headers or additional parameters?
- If my current approach is incorrect, could you please provide guidance on the proper method to subscribe to resource room events?