Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
Hi M Neha
Thank you for reaching out to Microsoft Q&A
Based on your description, I understand that you're successfully creating Microsoft Teams meetings via Microsoft Graph by setting IsOnlineMeeting = true and OnlineMeetingProvider = TeamsForBusiness, but you're encountering challenges retrieving the attendance report, specifically mapping the join link to the calendar event ID and accessing the meetingAttendanceReport-id and attendanceRecords after the meeting ends.
From my observe, this behavior arises because the Graph API separates calendar events and online meetings into distinct objects. While the calendar event contains metadata like the join link, the attendance report is tied to the onlineMeeting object, which has its own unique ID. The join link alone cannot be used to directly retrieve the event or attendance report unless you query the onlineMeeting endpoint with a filter on JoinWebUrl.
Therefore, in this context, you can follow the below instructions:
When creating the meeting, store both the calendar eventId and the onlineMeeting ID returned in the response. After the meeting ends, use the onlineMeeting ID to list meetingAttendanceReports:
GET /users/{userId}/onlineMeetings/{meetingId}/attendanceReports
Next step, you can retrieve the attendanceRecords using:
GET /users/{userId}/onlineMeetings/{meetingId}/attendanceReports/{reportId}/attendanceRecords
At the last step, kindly ensure your app has the OnlineMeetingArtifact.Read.All permission and that an application access policy is configured if using app-only authentication.
Link references:
Create or set an event as an online meeting in an Outlook calendar
Configure application access to online meetings or virtual events
You can try the above approach, if the problem still persists, kindly let me know in the comments for further support.
Hope my answer will help you
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.