microsoft / teams-ai

SDK focused on building AI based applications and extensions for Microsoft Teams and other Bot Framework channels
MIT License
349 stars 142 forks source link

[Bug]: TeamsSsoPrompt never completes due to timeout #1744

Open stepro opened 2 weeks ago

stepro commented 2 weeks ago

Language

C#

Version

latest

Description

Here the timeout value (default 15 minutes) is used to assign an absolute expiration time into the state. Later, it is used to determine if the prompt has timed out. Unfortunately, the initial assignment uses DateTime.Now but the check uses DateTime.UtcNow. This means that anybody who is more than 15 minutes behind UTC will observe that the dialog always times out at this stage.

Reproduction Steps

1. Try to run the 06.auth.teamsSSO.bot in the US, which is 5 or more hours behind UTC. It always silently ends the dialog before handling the token exchange invoke activity.