Issue: I am consistently getting a 400 error when using the "List call transcripts" Graph API for MS Teams. Hence, I would like to know if there is any permanent or temporary issue with this API or with the steps I have followed.
Objective: We have created a Teams bot app using the Teams bot framework, which is LIVE & published on Microsoft app source. I am now adding functionality to fetch transcripts for online meetings based on the user ID of the meeting organizer and the meeting ID.
Note: The bot application is developed using node.js.
API reference: Use Graph APIs to fetch transcript - Teams | Microsoft Learn
Steps followed:
- RSC permissions for accessing online meeting details and transcripts were added to the Teams bot manifest:
"OnlineMeeting.ReadBasic.Chat", "ChannelMeeting.ReadBasic.Group"
Note: I get an error on sideloading the app package, if I include the following additional permissions, hence the below permissions have not been added as yet.
"OnlineMeetingArtifact.Read.Chat", "ChannelMeetingArtifact.Read.Group".
Additionally, I do not find a way to include the following RSC permissions via the Microsoft app developer portal (https://dev.teams.microsoft.com/), hence included these permissions directly in the registered app in Azure, and provided admin consent via the oAuth URL (step 2).
'OnlineMeetingTranscript.Read.All, OnlineMeetingTranscript.Read.Chat'
- Admin approval for RSC permissions required by the app was provided via Teams Admin center (https://admin.teams.microsoft.com/).
In separate testing, the RSC permissions for online meetings were included in the registered app in Axure, and admin approval was granted via the direct oauth URL: https://login.microsoftonline.com/Azure-Tenant-ID/adminconsent?client_id=Azure-Application-Client-ID&state=randomnumber&redirect_uri=https://valid-url-to-be-shown-to-user-on-response
- Graph API invocation: The bot app listens to the "meeting end" event, extracts the userId and meetingId, and calls the "List call transcripts" API, as follows:
async onTurnActivity(context) {
if (context.activity.type == 'event' && context.activity.name == "application/vnd.microsoft.meetingEnd") {
// Getting the oauth token using app credentials (APP_CLIENT_ID, CLIENT_SECRET_VALUE) via https://login.microsoftonline.com/{}/oauth2/v2.0/token
const oAuth_token_data = await getOAuthToken(context.activity.channelData.tenant.id);
const oAuth_token = oAuth_token_data.access_token;
const transcriptUrl = `https://graph.microsoft.com/beta/users/${context.activity.from.aadObjectId}/onlineMeetings/${context.activity.channelData.meeting.id}/transcripts`;
// Request options
let config = {
method: 'GET',
headers: {
'Authorization': `Bearer ${oAuth_token}`
},
url: transcriptUrl
};
const response = await axios(config);
Note: The URL invoked looks like this (tried both variations, based on the documentation):
GET https://graph.microsoft.com/beta/users/ba321e0d-79ee-478d-8e28-85a19507f456/onlineMeetings/MSo1N2Y5ZGFjYy03MWJmLTQ3NDMtYjQxMy01M2EdFGkdRWHJlQ/transcripts
GET https://graph.microsoft.com/beta/users(07549e06-69d6-4177-8e62-33563c30f254)/onlineMeetings(MCMxOTpQUlBuOWJVQkhib3lEMFhzRmlBUUhNXzBPSkpHWFEtRXlBR1JXSWQxV
G1rMUB0aHJlYWQudGFjdjIjMTY3NjU1OTI0MDAzOQ==)/transcripts
- Receiving 400 error on API invocation: I am not receiving a 401 or 403 error with a proper response JSON, but instead a 400 error. There is no clarity on what the issue is related to; below is a snippet of the response.
Response snippet:
response: {
status: 400,
statusText: 'Bad Request',
headers: {
'transfer-encoding': 'chunked',
'content-type': 'application/json',
'strict-transport-security': 'max-age=31536000',
'request-id': '5e0d1c1d-ff10-46ef-ad9f-51639895f4cd',
'client-request-id': '5e0d1c1d-ff10-46ef-ad9f-51639895f4cd',
'x-ms-ags-diagnostic': '{"ServerInfo":{"DataCenter":"South Central US","Slice":"E","Ring":"5","ScaleUnit":"002","RoleInstance":"SN1PEPF000203E5"}}',
link: '<https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:meetingArtifactExportAPIs&from=2022-10-01&to=2022-11-01>;rel="depreca tion";type="text/html", <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:meetingArtifactExportAPIs&from=2022-10-01&to=2022-11-01>;r el="deprecation";type="text/html", <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=beta,PrivatePreview:meetingArtifactExportAPIs&from=2022-10-01&to=20 22-11-01>;rel="deprecation";type="text/html"',
deprecation: 'Wed, 05 Oct 2022 23:59:59 GMT',
sunset: 'Sat, 05 Oct 2024 23:59:59 GMT',
date: 'Wed, 15 Feb 2023 14:12:55 GMT',
connection: 'close'
},
config: {
transitional: [Object],
adapter: [Function: httpAdapter],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus],
headers: [Object],
method: 'get',
url: 'https://graph.microsoft.com/beta/users/07549e06-69d6-4177-8e62-33563c30f254/onlineMeetings/MCMxOTpQUlBuOWJVQkhib3lEMFhzRmlBUUhNXzBPSkpHWFEtRXlBR1JXSWQxVG1rMU B0aHJlYWQudGFjdjIjMTY3NjQ2NTI3OTQzMw==/transcripts',
data: undefined
}