Not able to download meeting transcript from app

Dhruvin Mashruwala 0 Reputation points
2025-08-07T07:18:48.38+00:00

I have an application and I want to download microsoft teams meeting transcript from that script. I have added required role to App registration but still getting authentication error.

Code.


credential = ClientSecretCredential(
    tenant_id=TENANT_ID,
    client_id=CLIENT_ID,
    client_secret=CLIENT_SECRET
)

graph_client = GraphServiceClient(credentials=credential, scopes=['https://graph.microsoft.com/.default'])

async def list_transcripts(user_id, meeting_id):
    transcripts = await graph_client.users.by_user_id(user_id).online_meetings.by_online_meeting_id(meeting_id).transcripts.get()
    return transcripts.value

async def download_transcript(user_id, meeting_id, transcript_id, output_path):
    from msgraph.generated.users.item.online_meetings.item.transcripts.item.content.content_request_builder import ContentRequestBuilder
    config = ContentRequestBuilder.ContentRequestBuilderGetRequestConfiguration()
    config.headers.add('Prefer', 'Content-Type="text/vtt"')

    content = await graph_client.users.by_user_id(user_id)\
        .online_meetings.by_online_meeting_id(meeting_id)\
        .transcripts.by_call_transcript_id(transcript_id)\
        .content.get(config)

    with open(output_path, 'wb') as f:
        f.write(content)
    print(f"✅ Transcript saved to: {output_path}")


Permissions

PII hidden

Error:

APIError

    Code: 403

    message: None

    error: MainError(additional_data={}, code='Forbidden', details=None, inner_error=InnerError(additional_data={}, client_request_id='96fcb1cf-02c5-45f5-963d-2d07a0febeaf', date=datetime.datetime(2025, 8, 7, 7, 32, 56), odata_type=None, request_id='6c25163e-fa70-4c91-8052-407d53482693'), message="Application is not allowed to perform operations on the user 'PII hidden', neither is allowed access through RSC permission evaluation.", target=None)
Microsoft Teams | Development
{count} votes

1 answer

Sort by: Most helpful
  1. Steven-N 5,485 Reputation points Microsoft External Staff Moderator
    2025-08-07T09:35:05.27+00:00

    Hi Dhruvin Mashruwala

    Thanks for reaching out to Microsoft Q&A forum support 

    Based on your description, I understand that you're attempting to download Microsoft Teams meeting transcripts using an application registered in Azure Active Directory. You've already assigned the necessary roles to the app registration, but you're encountering an authentication error during the process. 

    However, to better understand the issue you're experiencing, please provide the following additional information. These details will help us offer the most accurate and effective solution: 

    • What type of authentication are you using (app-only or delegated)? 
    • Have you granted admin consent for all the required Microsoft Graph API permissions? 
    • Are the transcripts stored in OneDrive for Business or SharePoint? 
    • What is the exact error message you're receiving (e.g., invalid_client, unauthorized, access denied)? 

    We are looking forward to hearing from you 


Your answer

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