web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Authentication within ...
Copilot Studio
Unanswered

Authentication within a topic often fails

(0) ShareShare
ReportReport
Posted on by

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.

I have the same question (0)
  • SupportBryn Profile Picture
    Microsoft Employee on at

    Hey @DrJGriff,

     

    This sounds like a fairly complicated issue, probably not one that could be solved without some direct insight into your bot's particular setup and some dedicated troubleshooting time. If you haven't already done so, I'd highly recommend opening a support ticket to address this, as the forums are often used for the solving of simpler problems, and you may be better served by finding a dedicated support agent for the issue.

     

    Thank you for using Microsoft Power Platform Communities!

    Bryn Baker

    Support Engineer

    Microsoft Power Platform

    If this post helps, then please consider accepting it as the solution to help other members find it more quickly! Have a great day!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 261 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 198 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard