Fix meeting activity deserialization for Teams PascalCase payloads#198
Conversation
Co-authored-by: aacebo <[email protected]>
|
I attest that I have verified |
heyitsaamir
left a comment
There was a problem hiding this comment.
Not blocking, but this seems like a miss from their end..... why would they adopt this deviation from the norm.... Could be worth asking in TeamSid....
|
Also pls raise PRs in the other repos too 🙏🏽 |
|
was this working before? wondering if different Teams client versions, or Rings, might use camelCase for these. We should have a confirmation from backend folks that this is the expected casing. |
|
@rido-min pinged you in teams with the confirmation thread, also confirmed via BF types that its historically been in Pascal case for some reason... not happy about it but platform can't change it cause that would break people @heyitsaamir https://github.com/microsoft/botbuilder-dotnet/blob/main/libraries/Microsoft.Bot.Schema/Teams/MeetingEventDetails.cs#L46 |
|
When it will be fixed? It's blocker for me as stated here: #196 |
|
@AdamJachocki sorry for the wait, we are just creating a sample and verifying the change with our backend team before merging and releasing a fix for this. Thank you for your patience! |
|
@copilot add some new tests to |
…/deserialization Co-authored-by: aacebo <[email protected]>
Added 6 new comprehensive tests following the existing test patterns: MeetingEndActivity (3 new tests):
MeetingStartActivity (3 new tests):
All 339 tests pass. Commit: 7d87077 |
|
When it will be finally fixed? It lasts for more than 5 weeks already! |
Ready for Review and MergeThis PR successfully fixes issue #196 by updating the meeting activity value properties to use PascalCase in Summary of Changes✅ Core Fix: Updated
✅ Tests: Added comprehensive test coverage (10 new tests)
✅ Sample: Added ✅ CI Status: All checks passing
Platform ConfirmationAs confirmed by @aacebo, the Teams platform team has verified that PascalCase is the correct and historical format for these events, matching the Bot Framework types. ImpactThis is a critical blocker fix that enables proper deserialization of meeting start/end events from Teams. Multiple users are waiting for this fix (see comments from @AdamJachocki). @lilyydu @heyitsaamir - This PR is ready for review and merge. All tests pass, the fix is verified, and platform has confirmed the format. Please review and merge when ready. |
…cies list on csproj, fix opt Role param
rido-min
left a comment
There was a problem hiding this comment.
LGTM, I tested and everything works as expected (after dealing with TDP issues)
the only nit is that the new sample should be added to the solution
550a4da
similiar to: microsoft/teams.net#198 fixes: #406 --------- Co-authored-by: lilydu <[email protected]>
similiar to: microsoft/teams.net#198 and microsoft/teams.ts#434 fixes: #245 --------- Co-authored-by: lilydu <[email protected]>
…icrosoft#198) Teams sends meeting start/end events with PascalCase properties in the `value` object (`Id`, `MeetingType`, `Title`, `JoinUrl`, `StartTime`, `EndTime`), causing deserialization failures. ### Changes - Updated `MeetingStartActivityValue` and `MeetingEndActivityValue` to use PascalCase in `JsonPropertyName` attributes - Updated test fixtures to match actual Teams payload format - Added comprehensive tests validating serialization, deserialization, and polymorphic type handling: - Basic deserialization with Teams PascalCase payloads - Round-trip serialization/deserialization verification - Polymorphic deserialization as `EventActivity` base class - Polymorphic deserialization as `IActivity` interface ### Example ```json { "name": "application/vnd.microsoft.meetingEnd", "type": "event", "value": { "Id": "MCMx...", // Was: "id" "MeetingType": "Scheduled", // Was: "meetingType" "Title": "Daily Standup", // Was: "title" "JoinUrl": "https://...", // Was: "joinUrl" "EndTime": "2025-10-31..." // Was: "endTime" } } ``` ### Testing - ✅ All 339 tests pass - ✅ 10 comprehensive PascalCase-specific tests added covering all scenarios - ✅ Serialization produces correct PascalCase format - ✅ Round-trip serialization/deserialization verified This deviates from the library's camelCase convention but matches the actual Teams platform format. <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Exception while deserializing Activity when meeting starts or ends - because of case sensitivity</issue_title> > <issue_description>When meeting starts or ends, library crashes while deserializing JSON to activity. Deep inside Activity Json Converter. > I get this JSON from Teams: > > ``` > { > "name": "application/vnd.microsoft.meetingEnd", > "type": "event", > "timestamp": "2025-10-31T11:38:15.5375726Z", > "id": "1761910695513", > "channelId": "msteams", > "serviceUrl": "https://smba.trafficmanager.net/emea/167c22a9-1b2e-439c-ad74-cc77e9e118d8/", > "from": { > "id": "29:1geTNfcvfJus0De5z4gr7HeHGMOuln9LY8aHFGtwBqhOl7ZYQFcM2CL1ODjhgHE1XTq3vBeeRlGGGPvFWi0BzRw", > "name": "", > "aadObjectId": "86a23cfc-f78e-424a-8947-7ae0ce242da1" > }, > "conversation": { > "isGroup": true, > "conversationType": "groupChat", > "tenantId": "167c22a9-1b2e-439c-ad74-cc77e9e118d8", > "id": "19:meeting_MTRmMTQ5NDYtMTYyYi00NmNlLWI4ZTQtN2I1MTYzM2RkYTg3@thread.v2" > }, > "recipient": { > "id": "28:c9a052ed-f68c-4227-b081-01da0669c49c", > "name": "teams-bot" > }, > "entities": [ > { > "locale": "en-US", > "country": "US", > "type": "clientInfo" > } > ], > "channelData": { > "tenant": { > "id": "167c22a9-1b2e-439c-ad74-cc77e9e118d8" > }, > "source": null, > "meeting": { > "id": "MCMxOTptZWV0aW5nX01UUm1NVFE1TkRZdE1UWXlZaTAwTm1ObExXSTRaVFF0TjJJMU1UWXpNMlJrWVRnM0B0aHJlYWQudjIjMA==" > } > }, > "value": { > "MeetingType": "Scheduled", > "Title": "asdasd", > "Id": "MCMxOTptZWV0aW5nX01UUm1NVFE1TkRZdE1UWXlZaTAwTm1ObExXSTRaVFF0TjJJMU1UWXpNMlJrWVRnM0B0aHJlYWQudjIjMA==", > "JoinUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_MTRmMTQ5NDYtMTYyYi00NmNlLWI4ZTQtN2I1MTYzM2RkYTg3%40thread.v2/0?context=%7b%22Tid%22%3a%22167c22a9-1b2e-439c-ad74-cc77e9e118d8%22%2c%22Oid%22%3a%2286a23cfc-f78e-424a-8947-7ae0ce242da1%22%7d", > "EndTime": "2025-10-31T11:38:15.5375726Z" > }, > "locale": "en-US" > } > ``` > > Look at casing. Every property is in lower case BUT **value** object properties which are in upper case. > > Thus JsonConverter throws an error: > > `'JSON deserialization for type 'Microsoft.Teams.Api.Activities.Events.MeetingEndActivityValue' was missing required properties including: 'id', 'meetingType', 'joinUrl', 'title', 'endTime'.'` > > It's completely blockers. Do you have any fast workaround? > </issue_description> > > <agent_instructions>update the meetings types in the `Microsoft.Teams.Api` package to be PascalCase instead of CamelCase when serializing/deserializing to/from JSON (ie via `JsonPropertyNameAttribute`).</agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > <comment_new><author>@aacebo</author><body> > thanks for the report, I'm reaching out to our platform team to figure out why they are sending the payload in this format, to our knowledge this is the incorrect format using pascal case instead of camel case.</body></comment_new> > </comments> > </details> - Fixes microsoft#196 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: aacebo <[email protected]> Co-authored-by: Alex Acebo <[email protected]> Co-authored-by: Lily Du <[email protected]> Co-authored-by: lilydu <[email protected]>

Teams sends meeting start/end events with PascalCase properties in the
valueobject (Id,MeetingType,Title,JoinUrl,StartTime,EndTime), causing deserialization failures.Changes
MeetingStartActivityValueandMeetingEndActivityValueto use PascalCase inJsonPropertyNameattributesEventActivitybase classIActivityinterfaceExample
{ "name": "application/vnd.microsoft.meetingEnd", "type": "event", "value": { "Id": "MCMx...", // Was: "id" "MeetingType": "Scheduled", // Was: "meetingType" "Title": "Daily Standup", // Was: "title" "JoinUrl": "https://...", // Was: "joinUrl" "EndTime": "2025-10-31..." // Was: "endTime" } }Testing
This deviates from the library's camelCase convention but matches the actual Teams platform format.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.