Forum Discussion

denis695's avatar
denis695
Copper Contributor
Jul 26, 2024

Access Teams Phone Call Recordings via API

Hey, guys.

I might need some help here because I'm just getting familiarized with the Teams API.

In our application, we allow Microsoft Admin user to grant an Admin Consent to their tenant, so we could access all organization users data at once instead of having every user to connect individually.

The requirement right now is to sync PSTN calls made with Teams Phone into the app. And we also need to get call recordings and transcriptions of the calls.

I have tried to add all sort of "application" level permissions like "OnlineMeetingRecording.Read.All", "OnlineMeetingTranscript.Read.All", file read permissions etc. with no luck.

Whenever I call "/v1.0/users/{user_id}/onlineMeetings/{call_id}/recordings", I'm getting an error:

"Application is not allowed to perform operations on the user '{user_id}', neither is allowed access through RSC permission evaluation."

Is it possible to have some kind of application wide permissions admin can grant to have access to the recordings and transcriptions for all organization?

And one more question, in the List PSTN calls there's no way to tell if the call have an associated recording or transcription record, right? I'm just thinking of the most optimal way to get available recordings instead of calling "/recordings" API for every call record..

  • denis695's avatar
    denis695
    Copper Contributor

    Ok, I figured that for online meetings, in order to use application permissions, I had to add application access policy and grant it to the tenant in addition.

    New-CsApplicationAccessPolicy -Identity CallRecordingsAccess-policy -AppIds "xxx" -Description "Access for call recordings and transcripts"
    Grant-CsApplicationAccessPolicy -PolicyName CallRecordingsAccess-policy -Global

    But I cannot see a way to get recordings and transcription for PSTN calls. It is possible to record and transcribe such calls via Teams app, but how can I get call artifacts via API?

    • warrenCommVision's avatar
      warrenCommVision
      Copper Contributor

      denis695 Have you been able to find a method to recover Call Recordings for PSTN Calls via the API or Subscriptions?

Resources