Skip to main content
Community site session details

Community site session details

Session Id : bZBk+dxmFd8YG7L/sIFO9+
Copilot Studio - General
Suggested answer

Disable validation code with SSO authentication

Like (1) ShareShare
ReportReport
Posted on 7 Feb 2022 17:03:53 by 4

Hi, I've followed the instructions here for configuring SSO with my chatbot: https://docs.microsoft.com/en-us/power-virtual-agents/configure-sso

 

What I am finding is that the first time a new user comes to the chatbot, they have to go through a process of loading a new tab which creates a validation code, and copying/pasting it back into the chat window (see attached screenshots). Only then are they logged. Any subsequent visit to the chatbot will use the SSO login, without the need for this validation code.

 

I really want to remove this extra validation code step to make using the chatbot much more seemless for new users, but I can't see how. Does anyone know if this is possible?

Chatbot1.pngChatbot2.pngChatbot3.png

Categories:
  • Suggested answer
    Doc Profile Picture
    2 on 18 Feb 2025 at 14:13:54
    Disable validation code with SSO authentication
     
  • anonymous882 Profile Picture
    on 30 Jul 2024 at 19:33:33
    Disable validation code with SSO authentication
    @berandomsen The solution you posted should completely eliminate the validation code window? 
     
    I followed your solution but even after the MSAL authentication I have the log in button from the chatbot that takes me to another tab to copy and paste in into chat. I am hosting my web app in GitHub pages and have the redirect link pointing there same place as  "https://token.botframework.com/.auth/web/redirect" . Am I doing anything wrong? 
  • berandomsen Profile Picture
    4 on 29 Feb 2024 at 00:44:56
    Re: Disable validation code with SSO authentication

    As I have suffered through this issue for a year, let me share the workaround I found for a Webchat SSO.

    The documentation alludes to a solution with code snippets, but there's no linked example:

    Configure single sign-on with Microsoft Entra ID - Microsoft Copilot Studio | Microsoft Learn

     

    Here's an example of using that method for SSO:

    https://github.com/microsoft/CopilotStudioSamples/blob/master/BuildYourOwnCanvasSamples/3.single-sign-on/index.html
    This example was posted in Github about a year ago, and you'll see that it comes with a crude login status message as well as a login button in the HTML. 


    I can confirm today, that the onSignInClick function works, as it opens up a standard MSAL popup that authenticates the user if there's already a session.  This is more typical of a user experience people are accustomed to. The pop up with the validation code from the token link, feels awkward, opening up an entire new tab, and creating additional steps for the user. 

    You must host your custom web canvas on a server, and in the canvas app registration, add that URL as a redirect URI, the same place you added "https://token.botframework.com/.auth/web/redirect" for this to work. 

     

     

  • koli Profile Picture
    2 on 25 Oct 2023 at 10:47:43
  • HenryJammes Profile Picture
    on 13 Jun 2023 at 12:58:48
    Re: Disable validation code with SSO authentication

    Then it should work. Best course of action to help you troubleshoot this is to open a support request:

    Get Help + Support in Power Platform - Power Platform | Microsoft Learn

  • Krutt Profile Picture
    12 on 13 Jun 2023 at 12:57:12
    Re: Disable validation code with SSO authentication

    It's on a internal website but not Sharepoint 

  • HenryJammes Profile Picture
    on 13 Jun 2023 at 12:02:34
    Re: Disable validation code with SSO authentication

    Is the bot embedded in a SharePoint site? 

    Because that's not supported either: https://learn.microsoft.com/en-us/power-virtual-agents/configure-sso?tabs=webApp#:~:text=Published%20to%20Teams%2C%20a%20SharePoint%20website%2C%20or%20a%20Power%20Apps%20portal 

  • Krutt Profile Picture
    12 on 13 Jun 2023 at 11:18:09
    Re: Disable validation code with SSO authentication

    Have tried both with the same result

  • HenryJammes Profile Picture
    on 13 Jun 2023 at 10:07:05
    Re: Disable validation code with SSO authentication

    @pcranston wrote:

    Hi, I've followed the instructions here for configuring SSO with my chatbot: https://docs.microsoft.com/en-us/power-virtual-agents/configure-sso

     

    What I am finding is that the first time a new user comes to the chatbot, they have to go through a process of loading a new tab which creates a validation code, and copying/pasting it back into the chat window (see attached screenshots). Only then are they logged. Any subsequent visit to the chatbot will use the SSO login, without the need for this validation code.

     

    I really want to remove this extra validation code step to make using the chatbot much more seemless for new users, but I can't see how. Does anyone know if this is possible?

    Chatbot1.pngChatbot2.pngChatbot3.png


    Hm this might be a documentation issue, I'll check.
    Have you tried the steps in the 'classic' tab? I don't expect his to be very different between the unified authoring and classic version of PVA: https://learn.microsoft.com/en-us/power-virtual-agents/configure-sso?tabs=classic 

  • Krutt Profile Picture
    12 on 13 Jun 2023 at 10:04:24
    Re: Disable validation code with SSO authentication

    Ok, we still get the validation code page. On the end of the article you sent i read that the validation code is required. Am i reading it wrong? I have also wondered if the github repository we use is for the "old" classic version of PVA, or since we use norwegian as language this might be a issue?

     

    Krutt_0-1686650531155.png

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 169 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 150

#3
sandeep_angara Profile Picture

sandeep_angara 75 Super User 2025 Season 2

Loading complete