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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Power Pages Agent: IsL...
Copilot Studio
Suggested Answer

Power Pages Agent: IsLoggedIn shows true all the time

(0) ShareShare
ReportReport
Posted on by 4
I have turned on the latest Power Pages Copilot and I am working with the SignIn/Authenticate process.
 
After enabling I went to the Copilot Studio and checked the new Agent that was created.  In the Test area, the bot is asking me to "Login" which does not work because there is a disconnect between Studio and Power Pages.  I am fine with that though i would hope Microsoft will eventually fix this issue so we can test Power Pages functionality from the Studio test environment (Time Consuming publishing for every test).
 
Moving over to Power Pages testing:  Somewhere in the background Copilot is calling the SignIn Topic (If I remove it, it will state it is missing and if I add a SendMessage, I can see the message).  One of the messages I added had the User.IsloggedIn variable and it comes back with "Yes" whether or not the Power Pages user is logged in.
 
I can't see the backend Authentication Action so I am assuming it is using this variable to determine if it should make the User Log in.
I also cannot set the variable (Thought if I could set it to False if the User.DisplayName = (Blank) then that may solve the issue.
 
I tried to follow the IsloggedIn through the Browser Debug and from what I can see, the variable is false for most of the journey but my dubbing skills are not that of a developer so I do lose it prior to it getting the Send Message where it says "Yes"
 
Anyone have any idea?
Is this a bug or is there something I am missing?
 
For a workaround, I am just asking them to sign in using the actual Power Pages sign in but it is clunky as it restarts the Bot.
  • Suggested answer
    SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at

    The behavior you're experiencing with Power Pages Copilot regarding the User.IsLoggedIn variable and the sign-in process seems to stem from a combination of limitations in how Copilot integrates with the Power Pages authentication flow and potential quirks in the User.IsLoggedIn variable's evaluation.

    Since Copilot relies on the portal's authentication status, use the Power Pages sign-in mechanism to establish the user session before engaging with the bot.

    Ensure the sign-in page is correctly configured in Power Pages: Go to Portal Management > Web Pages. Verify the sign-in page's URL and logic.

    Prompt users to sign in if User.IsLoggedIn = False. - "Welcome! Please [sign in](<sign-in URL>) to continue."
    Save the user's interaction context in a variable and reinitialize the bot's flow after login.

     

  • Suggested answer
    PM-20111707-0 Profile Picture
    4 on at
    SaiRT14 Thank you for your post and sorry for the delay in reply, I was trying to research some of your comments.
     
    Agreed, there is something not performing correctly in the backend.
     
    "Since Copilot relies on the portal's authentication status, use the Power Pages sign-in mechanism to establish the user session before engaging with the bot."
     
    This is the Out-of-Box Copilot integration for Power Pages, I don't see any configuration for stopping the bot from showing (Engaging) prior to login... And if there was, then the bot would not be able to tell the user to sign in.
     
     
    "Ensure the sign-in page is correctly configured in Power Pages: Go to Portal Management > Web Pages. Verify the sign-in page's URL and logic."
     
    Seems to be.  Username/pass or use Azure shows up... I think this info is on a Snippet
     
     
    "Prompt users to sign in if User.IsLoggedIn = False. - "Welcome! Please [sign in](<sign-in URL>) to continue."
    Save the user's interaction context in a variable and reinitialize the bot's flow after login."
     
    That is the underlying issue:  User.IsLoggedIn always shows True whether the user is logged into the portal or not... The only field that seems to work is User.Id (Which is what I am currently using to check if the user is logged in - If it equals "00000000-0000-0000-0000-000000000000", then the user is not logged in.  I do like the idea of adding the Sign-In link directly into the bot although it does open a new page and could get confusing to the user.  That is why the process that it looks like Microsoft was going for with the actual Authentication Creds right in the bot window would have been perfect.
     
    I will continue to research... Thanks again

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Copilot Studio

#1
Mohsin Ali Profile Picture

Mohsin Ali 356

#2
Valantis Profile Picture

Valantis 253 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 179 Super User 2026 Season 2

Last 30 days Overall leaderboard