Share via

Auto Meeting Session timeout

Info Omniwish 35 Reputation points
2026-03-23T07:18:53.1033333+00:00

I am building a MERN stack application where I create Microsoft Teams online meetings using Microsoft Graph API.

My use case:

  • Meetings are scheduled with a fixed duration (e.g., 30–60 minutes)
  • Participants receive the meeting link and join via Microsoft Teams
  • I want the meeting to automatically end after the scheduled duration, even if participants remain active

What I have tried so far:

  1. Setting startDateTime and endDateTime while creating the meeting → This does not enforce the meeting end; it only defines the schedule
  2. Updating meeting settings after expiry (e.g., isHostRequired = true) → This prevents new participants from joining but does not remove existing participants
  3. Explored Graph API capabilities for ending meetings → I could not find any API that forcefully ends a meeting for all participants

Challenges:

  • Participants who join just before expiry can continue the meeting indefinitely
  • There is no apparent way to enforce a strict session timeout

Questions:

  1. Does Microsoft Teams or Microsoft Graph API support forcibly ending a meeting for all participants?
  2. Is there any session timeout or policy setting available for Teams meetings?
  3. Are there any recommended approaches (e.g., bots, calling APIs, or administrative policies) to enforce meeting duration?

I would appreciate clarification on whether this is a platform limitation or if there is a supported workaround.

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs

0 comments No comments

2 answers

Sort by: Most helpful
  1. Steven-N 23,700 Reputation points Microsoft External Staff Moderator
    2026-03-23T08:46:41.7766667+00:00

    Hi Info Omniwish

    Based on your description, I have conducted some research, and the below information might help

    1/ Does Microsoft Teams or Microsoft Graph API support forcibly ending a meeting for all participants?

    Unfortunately, No, currently Microsoft Teams and the Microsoft Graph API do not provide any endpoint that forcibly terminates an active meeting session and removes all current participants simultaneously. The endDateTime property on the onlineMeeting resource is used for scheduling purposes only and carries no enforcement behavior once the meeting is in progress.

    As states in: onlineMeeting resource type

    2/ Is there any session timeout or policy setting available for Teams meetings?

    As far as I know, there is a tenant-level or per-user meeting policy available through the Microsoft Teams PowerShell module that can be configured to automatically end a meeting after a period of inactivity. This is managed via Set-CsTeamsMeetingPolicy and requires Teams Administrator privileges. However, this policy applies uniformly and cannot be configured on a per-meeting basis through the Graph API.

    You can read here for more information: Set-CsTeamsMeetingPolicy | Manage meeting policies

    3/ Are there any recommended approaches to enforce meeting duration?

    Yes, in my opinion, you can try deploying a Teams bot that joins the meeting as a participant using the Cloud Communications API by following below instructions:

    • Register a bot via Azure Bot Framework
    • Join the meeting programmatically using
    POST /communications/calls 
    
    • When the timer expires, the bot calls:
    DELETE /communications/calls/{call-id}
    

    This will ends the call from the bot's perspective (which acts as host/organizer), and terminates the session for all participants if the bot is the meeting organizer.

    Note: The bot must join as the meeting organizer (using application permissions and the organizer's identity), not as a regular attendee. If the bot only joins as a guest, deleting its own leg does not end the meeting for others.

    Graph API call to end the call:

    DELETE https://graph.microsoft.com/v1.0/communications/calls/{call-id}
    

    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.  

    1 person found this answer helpful.

  2. Q&A Assist
    2026-03-23T07:19:11.6533333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more
    1. Microsoft Teams and Microsoft Graph do not currently provide an API to forcibly end an online meeting for all participants on demand. The platform exposes:
      • Scheduling metadata (start/end times) on the meeting object.
      • Presence and meeting events (for example, start/end notifications to apps). But there is no documented Graph or Teams API that disconnects all participants or hard-stops a running meeting.
    2. There is no configurable “session timeout” for Teams meetings that enforces a hard stop at the scheduled end time. Relevant platform limits are:
      • Teams meetings, webinars, and town halls have a maximum time limit of 30 hours. After that, the meeting ends regardless of schedule.
      • Meeting links and recurrence patterns have expiration rules (for example, scheduled one-time meetings expire 60 days after the scheduled time), but these govern link validity and re-use, not an in-call timeout.
      From the documented limits:
      • Scheduled one-time meeting: expires 60 days after the scheduled time.
      • Meet now (calendar/channel): expires 60 days after link creation.
      • Recurring with end date: 60 days from end date or last occurrence, whichever is longer.
      • Recurring with no end date: 1 year after last access/join/update.
      None of these settings force-disconnect participants at the scheduled end.
    3. Recommended/possible approaches within current platform capabilities: There is no supported, fully enforced “hard stop” mechanism, so any solution will be advisory or UX-driven rather than technically enforced:
      • Use meeting duration and expiration semantics only as guidance:
        • Set startDateTime/endDateTime to reflect the intended duration.
        • Communicate clearly in the invite that the meeting is limited to that duration.
      • Use a Teams meeting app/bot to monitor and react to time:
        • A meeting app can receive real-time meeting events (start/end, participant join/leave) via a bot.
        • The bot can track elapsed time from the actual start and, when the configured duration is reached, it can:
          • Post a message in the meeting chat that the session has ended.
          • Optionally instruct the organizer to end the meeting manually.
        • This still cannot forcibly disconnect users, but it provides automated enforcement signals and UX.
      • Administrative or organizational policy:
        • Use policy and training to require organizers to end meetings at the scheduled time.
        • Combine with monitoring (for example, reporting on unusually long meetings) if needed.
      Given the current documentation, this is a platform limitation: there is no supported way to programmatically terminate a running Teams meeting or impose a strict per-meeting session timeout shorter than the global 30‑hour limit.

    References:


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.