Microsoft Teams webhook events and recording

CG 45 Reputation points
2026-01-20T06:19:02.52+00:00

I am developing a C# application with the purpose of recording Microsoft Teams calls (PSTN, internal calls etc).

I have set up an app registration and configured it as multi-tenant. I have also setup a multi tenant Azure Bot.

Right now, I am trying to get real time webhooks events from Microsoft Teams apps every time calls occur. The MS Teams users are in a different domain than my app registration/bot domain.

What do i need in order to get real time webhooks notifications from my MS Teams tenants ? I am looking for JSON payloads when an incoming, outgoing call starts or ends with information such as caller or callee,etc... ?

I have subscribed to the events but i did not receive any real time notifications. I've connected the Azure Bot to Microsoft Teams Channel, enabled calling and specified a webhook url for calling. Also i've set the API permissions to Calls.Initiate.All, Calls.InitiateGroupCall.All, Calls.JoinGroupCall.All, CallRecordings.Read.All, CallRecords.Read.All, Calls.AccessMedia.All

Microsoft Teams | Development
Microsoft Teams | Development

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


Answer accepted by question author
Kudos-Ng 15,050 Reputation points Microsoft External Staff Moderator
2026-01-20T10:29:13.88+00:00

Hi CG,

Thank you for posting your question in the Microsoft Q&A forum. 

From your description, I’m unsure which of the two scenarios you need, so I’ll outline both and the correct approach for each:

1) Log call metadata for reporting/analytics (no media recording)

If your goal is to log call metadata (participants, modalities, quality/diagnostics, etc.) for calls that occurred in your tenant, you do not need a bot. Use Microsoft Graph Change Notifications for Call Records to receive webhooks when a call record is created:

At this time, there isn’t a Graph subscription that will fire tenant‑wide, real‑time notifications for every incoming/outgoing PSTN or 1:1 Teams call unless a bot is a participant in those calls.

2) Record call media (audio/video) in real time

If your intent is to have a bot join a call and record media, use Microsoft’s Policy‑based Compliance Recording model:

With this approach, your organization must:

  1. Create/configure a ComplianceRecordingPolicy,
  2. Associate your bot’s application instance with that policy, and
  3. Assign the policy to the target users.
    When users who are in-scope for the policy join calls/meetings, Teams invites your bot; your bot then receives real‑time media for compliant recording.

Additionally, you mentioned setting up a multi‑tenant bot. However, be aware that Microsoft’s recent guidance indicates deprecation of creating new multi‑tenant bots and a move toward single‑tenant apps with per‑tenant onboarding (admin consent + application instance + policy assignment). If you’ve recently created a multi‑tenant bot, this could affect authentication with the Teams channel and future supportability.

User's image

Since you also mentioned that you “subscribed to an event but aren’t receiving notifications,” please share exactly what you subscribed to so we can assist you to troubleshoot the issue:

  • Resource URI (e.g., communications/callRecords, communications/onlineMeetings(...)/meetingCallEvents, etc.)
  • Subscription payload you posted (redact secrets): changeType, resource, notificationUrl, expirationDateTime, and whether includeResourceData/certs were used
  • The HTTP response your endpoint returns for validation and for notifications (remember Graph expects a quick 2xx)

I hope the information above helpful.


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.

Was this answer helpful?

1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. CG 45 Reputation points
    2026-02-03T22:23:43.2166667+00:00

    Hello,

    Thank you for the detailed explanation. I have two follow-up questions:

    1. Real-Time Media SDK - Platform Requirements

    To receive the decoded 20ms PCM audio frames via the Media Platform SDK, does my application need to run on Windows Server (2016/2019/2022) or Azure VM? Or can I develop and run this on Windows 10/11?

    2. Post-Call Audio Download Options

    I want to confirm my understanding of what's available after a call ends:

    • User-initiated recording (user clicks "Record" in Teams) → Audio saved to OneDrive → Can be downloaded via Graph API
    • Compliance recording bot → No post-call download; the bot must capture audio in real-time
    • Call Records API → Metadata only, no audio file

    Is there any way to enable automatic recording of all calls (including PSTN and 1:1 calls) that saves to OneDrive or SharePoint without requiring a real-time compliance bot? Or is the real-time Media Platform SDK the only option for automatic call recording?

    Thank you.

    Was this answer helpful?


  2. CG 45 Reputation points
    2026-01-23T06:59:26.54+00:00

    Hi,

    Here's a summary of my setup:

    Phase 1: Azure Portal Setup (domainA.com)

    1. App Registration

    Create a new App Registration in the Azure Portal.

    Supported Account Types: Choose "Accounts in any organizational directory" (Multitenant).

    • API Permissions: Add the following Application Permissions (Microsoft Graph):
      • Calls.AccessMedia.All Calls.JoinGroupCall.All
        `Calls.Initiate.All`
        
    • Grant Admin Consent: Click "Grant admin consent for xxxxxx" so the permissions are active for your testing.
    1. Authentication (Certificate)
    • Upload an existing certificate bound to port 8443 .cer file to your App Registration under "Certificates & secrets."
    1. Create the Azure Bot Resource
    • Create an Azure Bot resource.
    • Link the App ID: Use the Client ID from Step 1.
    • Messaging Endpoint: https://bot.testing.com:8443/api/messages/).
    • Teams Channel: Enable the "Microsoft Teams" channel and check the "Enable Calling" box. Provide your webhook for calling (e.g., https://bot.testing.com:8443/api/calling/).

    Phase 2: Customer Provisioning (domainB.com)

    1. Admin Consent

    Provide this link to the domainB.com admin: https://login.microsoftonline.com/common/adminconsent?client_id=YOUR_APP_ID Once they sign in and accept, your bot is officially authorized to "exist" in their tenant.

    1. PowerShell Infrastructure

    The admin needs to run these commands using the Microsoft Teams PowerShell Module.

    Step A: Create the Application Instance This creates a "ghost user" in their tenant that represents your bot.

    New-CsOnlineApplicationInstance
    

    Take note of the ObjectId returned by this command.

    Step B: Sync the Instance

    PowerShell

    Sync-CsOnlineApplicationInstance
    

    Step C: Create & Assign the Policy This tells Teams: "Whenever these users call, invite the Bot."

    PowerShell

    # Create the policy
    
    # Link your bot to the policy
    
    
    

    When I tried a test call between ******@domainB.com and ******@domainB.com, I did not however received any events at all.

    I have a listener started on https://bot.testing.com:8443/api/calling/

    Am I missing a step ? Is there a way to test whether the bot has joined once a call is established between userA and userB ?

    Was this answer helpful?


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.