Forum Discussion
Getting “Meeting Id is corrupted” error while trying to fetch meeting details from Graph API
This is a known disconnect. The meetingId exposed by the Teams Client SDK differs from the meeting id exposed in Graph. However, you should be able to get the Graph meeting id by making a call to
- GET /chats/{chat-id}?$select=onlineMeetingInfo
-
Thereafter use the following request to get the OnlineMeeting resource:
GET /users/{userId}/onlineMeetings?$filter=joinWebUrl eq '{joinWebUrl}'
You would get the {chat-id} for #1 from a call into Teams Client SDK.
Response to #2 will give you the correct Graph OnlineMeetingId in case you want to store a mapping for later.
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
- Rhman101Feb 26, 2025Copper Contributor
I know this is an old thread, but I had the same problem today. It was very confusing! I appreciate the help, but don't you want to make this clear in the docs? Because the intuitive response is that the id is always correct.
- pksukeshpkJun 13, 2024Copper ContributorThanks, Prasad, for the reply. But unfortunately, we cannot use the chat API. Is there any other option to get the online meeting details by using the chatid that we are getting from the SDK context?
- Prasad_Das-MSFTJun 13, 2024
Microsoft
pksukeshpk - the above provided steps are the only ones provided by engineering team as workaround. There doesn't seem to be any other way available.
- pksukeshpkJun 13, 2024Copper Contributor
For calling the online meeting API, how will we get the joinWebUrl?
- Pradeep1090Jun 13, 2024Copper Contributor
We cannot use the Chat API as we don't have required scope permissions to use it. Is there anyother way round this problem?
- PraveenPatelTQJan 30, 2025Copper Contributor
Any updates on this?
- CMiguelFerreiraMay 16, 2025Copper Contributor
It took me ages to reverse-engineer this, but I found a working solution.
Shame, shame, shame on Microsoft for working in silos and not attempting to fix the resulting mess.
In a nutshell, you need to do some replacing of the meeting id from the one you have from Teams into Graph.
The step-by-step process is as follows:
- The ID you get from Teams looks like "MCMxOTptZWV0aW5nX016YzJabVkzT0RFdFl6QTJaaTAwT1RBMExXRXlNRFF0T0RkbVl6TTRNRE15TlRJMkB0aHJlYWQudjIjMA=="
- You decode the Base64, leading to "0#19:meeting_Mzc2ZmY3ODEtYzA2Zi00OTA0LWEyMDQtODdmYzM4MDMyNTI2@thread.v2#0"
- You then need to get rid of "0#" and "#0", hence "19:meeting_Mzc2ZmY3ODEtYzA2Zi00OTA0LWEyMDQtODdmYzM4MDMyNTI2@thread.v2"
- The prepend "1*" + <GUID of the User> + "*0**", resulting in "1*b2267176-534c-4bef-800a-d598623e2f7f*0**19:meeting_Mzc2ZmY3ODEtYzA2Zi00OTA0LWEyMDQtODdmYzM4MDMyNTI2@thread.v2"
- Finally, Base64 the result "MSpiMjI2NzE3Ni01MzRjLTRiZWYtODAwYS1kNTk4NjIzZTJmN2YqMCoqMTk6bWVldGluZ19NemMyWm1ZM09ERXRZekEyWmkwME9UQTBMV0V5TURRdE9EZG1Zek00TURNeU5USTJAdGhyZWFkLnYy"
Here is a complete implementation in C# from ITurnContext. I have two extensions methods to convert to and from Base64, which I'm not herein including:
public static async Task<IReadOnlyList<SimpleChatMessage>> GetTranscript(ITurnContext turnContext, CancellationToken cancellationToken = default)
{
var participants = await TeamsInfo.GetMembersAsync(turnContext);
var firstPartipant = participants.First();var meetingId = System.Text.Encoding.UTF8.GetString(channelData.Meeting.Id.FromBase64String());
var meetingLongId = "1*" + firstPartipant.AadObjectId + "*0**" + meetingId.Replace("#0", "").Replace("0#", "");
meetingLongId = meetingLongId.ToBytes().ToBase64String();var currentPage = await GraphServiceClient.Users[firstPartipant.AadObjectId].OnlineMeetings[meetingLongId].Transcripts.GetAsync(requestConfiguration =>
{
// requestConfiguration.QueryParameters.Top = 1; // maximum
//requestConfiguration.QueryParameters.Orderby = new string[] { "createdDateTime desc" };
}, cancellationToken).ConfigureAwait(false);var latestTranscript = currentPage.Value.Last();
}