请求提供微软Teams会议组织者可访问的会议详情及考勤查询API
Solution: Organizer-Friendly Teams Meeting Details & Attendance API
Great question—building a Teams meeting attendance report tool for organizers is such a practical use case, and the endpoints you found aren’t quite right (they’re for live calls, not scheduled meetings, and require admin rights). Let’s dive into the exact Microsoft Graph API tools you need, no admin hoops required.
1. Core Endpoints (Organizer-Only Access)
These endpoints are designed specifically for meeting organizers to access their own meeting data, no admin consent needed:
- List your scheduled/ended meetings:
GET /me/onlineMeetings(add a filter to target only completed meetings:?$filter=endDateTime le now()) - Get meeting core details:
GET /me/onlineMeetings/{meetingId}(grabs agenda, organizer info, meeting timestamps) - Get full attendance report:
GET /me/onlineMeetings/{meetingId}/attendanceReports/{reportId}(contains all participant entry/exit times and active duration)
2. Required Permissions (No Admin Approval)
You’ll need to request delegated permissions from the organizer when they authenticate your app:
OnlineMeeting.Read: Read-only access (enough for pulling meeting details and attendance reports)OnlineMeeting.ReadWrite: Optional, if you need to modify meeting settings later
Organizers can grant these permissions directly—no admin sign-off required, which is perfect for your user-centric app.
3. Example Requests & Key Data Points
Example 1: Fetch All Your Completed Meetings
GET https://graph.microsoft.com/v1.0/me/onlineMeetings?$filter=endDateTime le now()
Key fields from the response:
subject: The meeting’s agenda/titleorganizer: Object with the organizer’s name, email, and IDid: The unique meeting ID you’ll use to fetch attendance data
Example 2: Get Attendance Reports for a Specific Meeting
First, grab the list of reports for your target meeting:
GET https://graph.microsoft.com/v1.0/me/onlineMeetings/{meetingId}/attendanceReports
This returns one report per meeting instance. Copy the id of the report you want, then:
Example 3: Pull Full Attendance Details
GET https://graph.microsoft.com/v1.0/me/onlineMeetings/{meetingId}/attendanceReports/{reportId}
The attendanceRecords array in the response has everything you need for your report:
user.displayName: Participant’s full namejoinDateTime: Exact time they joined the meetingleaveDateTime: Exact time they leftdurationInSeconds: Total active time in the meeting (calculated automatically)
4. Why This Beats the Endpoints You Found
The call/list-participants endpoint you referenced is built for live, ad-hoc video calls (not scheduled Teams meetings) and requires admin rights to access cross-user call data. The onlineMeeting/attendanceReports endpoints are purpose-built for scheduled Teams meetings, and are restricted to the meeting organizer by default—exactly what you need to build your attendance report tool without admin barriers.
5. Bonus: Build the Report/Email Feature
- Downloadable report: Parse the JSON response into a CSV or Excel file using libraries like
csv-writer(Node.js) orpandas(Python) - Email the report: Use the Microsoft Graph
POST /me/sendMailendpoint to attach the generated report and send it directly to the organizer
内容的提问来源于stack exchange,提问作者Yashwanth Battula

