botbuilder-js icon indicating copy to clipboard operation
botbuilder-js copied to clipboard

Expose User’s Teams Theme in Incoming Message Context

Open MajaEffenberg opened this issue 6 months ago • 0 comments

Currently, our bot can’t detect which Microsoft Teams theme the user is using (light, dark, or high contrast) in conversation. This makes it difficult to ensure that images in Adaptive Cards, like icons or logos, are always clearly visible. Having access to the user’s theme would let us adjust visuals accordingly and provide a better, more accessible experience.

It would be helpful if the current user's Teams theme were exposed in the TurnContext, through a dedicated property, and provided with each incoming message. This would allow the bot to select the appropriate image version based on the user’s theme, ensuring visuals remain clear and easy to read.

For example, right now we need a single icon optimized to work in both light and dark modes, which means it doesn’t look perfect in either. If we knew the user’s current theme, the bot could send different, better-optimized images for each mode.

Image Image

MajaEffenberg avatar Jun 06 '25 09:06 MajaEffenberg