adhiman
adhiman

Reputation: 113

Graph API - Access room calendar using a delegate

I'm looking into possible approach to access a room's calendar using a delegated account. I have registered a confidential client application on AAD, which seems to work fine but I'm considering to use a specific account(provided it has all the necessary permissions) to do this on behalf of any room resource. So for e.g. when a request from [email protected] (which is a room mailbox) comes, [email protected](delegated account) retreives abc's calendar events and returns to the application. Which OAuth2.0 grant flow is applicable can I use in this case? My application is a desktop based app which can talk to a WCF services in order to retrieve room's calendar.

Upvotes: 0

Views: 622

Answers (1)

Allen Wu
Allen Wu

Reputation: 16498

Theoretically you could do that.

You need to give the Full Access mailbox delegation of room mailbox to delegated account in Exchange Admin Center.

Follow Get access on behalf of a user to use auth code flow to get the access token.

Then just use GET https://graph.microsoft.com/v1.0/users/{room mailbox}/calendar to get the room calendar.

The required permissions should be Calendars.Read, Calendars.Read.Shared.

Upvotes: 1

Related Questions