User.IsLoggedIn = False
. - "Welcome! Please [sign in](<sign-in URL>) to continue."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.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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.