How can I use /users/{user-Id}/events/ to see Teams meetings attendance reports?

Chris McCuskey 0 Reputation points
2024-05-23T18:49:34.3166667+00:00

Screenshot (56)

I'm using Graph Explorer to read Team meetings reports, specifically the attendees join/leave times and their individual durations in the meeting. I can get all the data I need from my personal user ID. I am trying to use a GET https://graph.microsoft.com/v1.0/users/{user-id}/events . I am going into a training website and finding the organizers names, getting their ID's through graph explorer then using the above request to try to receive the meeting info of the training event. I have the API permissions set up in Azure AD, I am getting my token and have my request headers set up properly. When I run the request I am receiving this error. It's my understanding that the JWT is already encrypted and doesn't need this piece of the header. Any ideas how I can fix this?

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

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 39,021 Reputation points
    2024-05-24T06:25:28.04+00:00

    Hi @Chris McCuskey

    There are two scenarios where an app can get events in another user's calendar:

    • If the app has application permissions, or,
    • If the app has the appropriate delegated permissions from one user, and another user has shared a calendar with that user, or, has given delegated access to that user. See details and an example.

    Therefore, if the target user has not shared their calendar with you, you will not be able to get their event list in Graph Explorer (delegated context). Instead, you should grant the calling app the Calendars.Read application permission and use a daemon-based client credentials flow to request an access token, and finally call this API endpoint in Postman.

    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.