Access denied when fetching resource (room) calendar

Donovan Charpin 1 Reputation point
2021-09-21T13:04:38.34+00:00

Hi!

I implemented the msgraph where I get the resources

/places/microsoft.graph.room

Then, for each resource, I call the endpoint to get the calendar (from the room email address)

/users/<ResourceEmail>/calendar

It works well with a client using only Microsoft 365 but for another client using both Microsoft 365, Azure AD and exchange, I'm not able to get the second call retrieving the calendar, I get this error

403 Forbidden: {"error":{"code":"ErrorAccessDenied","message":"Access is denied. Check credentials and try again."}}

The scopes are

"Calendars.ReadWrite",
"Place.Read.All",
"Directory.ReadWrite.All",
"User.ReadWrite.All",
"offline_access"

The account that connected through Oauth2 is admin. We tried to connect to Outlook 365 with this account and I can see the resources and the calendars. We delegated the resource to the admin in Office 365 and Azure, I really don't understand this issue as it works with a client and not the other, there is maybe a misconfiguration in the account?

Thanks!


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,321 questions
{count} votes