Microsoft Graph API: How to access guest calendar events using API

Sanket Khot 51 Reputation points

I am working on the integration of the outlook calendar with our app. I am trying to get the calendar events of the guest user. So far I have done the following steps.

Registered an app in the Azure Active Directory admin centre and added the following API permissions.

User's image

Then I used the following API call to get the access token.{tenant_id}/oauth2/v2.0/token

I used this token to get the user list which is working fine.

Then I am using user_id from this result to call the following APIs{user_id}/calendars{user_id}/calendars/events{user_id}/events

I am getting a successful result for Member users but getting the following error for guest users

>The AadGuestPft token doesn't contain the permissions required by the target API.

Any Idea what am I missing ?

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

Accepted answer
  1. Gopinath Chennamadhavuni 2,426 Reputation points

    Hi @Sanket Khot ,

    Hope you are doing well.

    As per my knowledge, we cannot get event details of external/guest user, or any user that does not actually have an Exchange Online mailbox (within your own tenant). The only way around this would be to have AAD app and the external user (or an admin from his organization) consent to your app, thus add it to their own tenant and grant the relevant permissions. A mailbox will still be required.

    Hope this helps.

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

    0 comments No comments

0 additional answers

Sort by: Most helpful