Bug report
When opening a Teams message extension action command from iPhone, the invoke payload can omit value.commandContext.
With:
Microsoft.Teams.Plugins.AspNetCore 2.0.9
Microsoft.Teams.Extensions.Graph 2.0.9
the request fails during deserialization before app handlers run.
Actual behavior
The SDK throws:
System.Text.Json.JsonException: JSON deserialization for type 'Microsoft.Teams.Api.MessageExtensions.Action' was missing required properties including: 'commandContext'.
This happens in Microsoft.Teams.Plugins.AspNetCore.AspNetCorePlugin.ParseActivity(...).
Expected behavior
Either:
- Teams mobile should always send
commandContext, or
- the SDK should treat
commandContext as optional for this invoke shape
Repro
- Create a compose extension command with:
type: action
fetchTask: true
- Open it from Teams web/desktop → works
- Open the same command from Teams on iPhone → request may omit
value.commandContext
- SDK deserialization fails before handler execution
Working payload example
{ "name": "composeExtension/fetchTask", "value": { "commandId": "createTicket", "commandContext": "compose", "context": { "theme": "default" } } }
Failing payload example
{ "name": "composeExtension/fetchTask", "value": { "commandId": "createTicket", "context": { "theme": "dark" }, "state": "" } }
Workaround
Application-side middleware was required to inject a fallback commandContext before SDK deserialization.
Question
Is this a known Teams iPhone client issue, or should the SDK tolerate missing commandContext here?
Bug report
When opening a Teams message extension action command from iPhone, the invoke payload can omit
value.commandContext.With:
Microsoft.Teams.Plugins.AspNetCore2.0.9Microsoft.Teams.Extensions.Graph2.0.9the request fails during deserialization before app handlers run.
Actual behavior
The SDK throws:
System.Text.Json.JsonException: JSON deserialization for type 'Microsoft.Teams.Api.MessageExtensions.Action' was missing required properties including: 'commandContext'.
This happens in
Microsoft.Teams.Plugins.AspNetCore.AspNetCorePlugin.ParseActivity(...).Expected behavior
Either:
commandContext, orcommandContextas optional for this invoke shapeRepro
type: actionfetchTask: truevalue.commandContextWorking payload example
{ "name": "composeExtension/fetchTask", "value": { "commandId": "createTicket", "commandContext": "compose", "context": { "theme": "default" } } }
Failing payload example
{ "name": "composeExtension/fetchTask", "value": { "commandId": "createTicket", "context": { "theme": "dark" }, "state": "" } }
Workaround
Application-side middleware was required to inject a fallback
commandContextbefore SDK deserialization.Question
Is this a known Teams iPhone client issue, or should the SDK tolerate missing
commandContexthere?