In brief
I have created a PVA with authentication inside a topic ("on canvas"). The authentication step works most of the time, but fails often enough to be unusable.
Manage Security
I set the Authentication to be Manual (for any channel includig Teams) and I did not check the checkbox "Require users to log in". The behaviour I'm after is that an anonymous user may call the topic, and we will ask them to log in if they choose a particular path through the topic
In-Topic authentication behaviour
We have an authentication step within the topic. After publishing the PVA, we then test this using the demo website link on the Publish page.
Most times it works as expected, so:
- The user types in the trigger phrase to start the Topic
- The user is presented with a [Login] button
- On clicking the button the user authenticates (if not already done so) and then gets presented with a magic code
- They copy/paste the magic code into the PVA
- They then execute the flow for the condition where `bot.IsLoggedIn` is true
However, occassionally this doesn't work and it's frequent enough to make this unusable....
Here, the flow is:
- The user types in the trigger phrase to start the Topic
- The user is presented with a [Login] button
- On clicking the button the user authenticates (if not already done so) and then gets presented with a magic code
- They paste the magic code into the PVA
- However, now they execute the condition where `bot.IsLoggedIn` is false
- If we echo back all the authentication properties then we see:
- bot.AuthToken is the long string
- bot.IsloggedIn is false
- bot.UserDisplayName is the expected user's name
- bot.UserId is aGuid
- If we now re-type the trigger phrase to restart the Topic, we then immediately execute the flow for the condition where `bot.IsLoggedIn` is true
So, initially authentication fails because the user is marked as not logged in, but we're able to see the user's name. And when re-triggering the same topic immediately afterwards, then the user is marked as logged in.
It seems from my perspective to be a timing issue...?
I have tested this with different PVAs in different tenant environments. Same level of fragility and same symptoms.

Report
All responses (
Answers (