microsoft/teams.net
Publicmirrored from https://github.com/microsoft/teams.netAvailable
Commit
Add CompatTeamsSSOTokenExchangeMiddleware for SSO token exchange
The BF SDK's TeamsSSOTokenExchangeMiddleware triggers code paths through
TeamsActivityHandler.OnTeamsMembersAddedDispatchAsync that call
TeamsInfo.GetMemberAsync, which casts IConversations to the concrete
Conversations class. This fails with InvalidCastException because
CompatConversations only implements IConversations:
System.InvalidCastException: Unable to cast object of type
'Microsoft.Teams.Bot.Compat.CompatConversations' to type
'Microsoft.Bot.Connector.Conversations'.
This adds CompatTeamsSSOTokenExchangeMiddleware as a drop-in replacement
that works with CompatUserTokenClient. Calling code should use this
middleware and CompatTeamsInfo instead of the BF SDK equivalents.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>Changed files
1 files listed