Skip to main content

Notifications

Power Platform Community / Forums / Bot Administration / How to bypass validati...
Bot Administration
Unanswered

How to bypass validation code after authentication is successful?

Posted on by 18
Hello,
 
I am trying to bypass the double validation in the power virtual agent upon authentication. After the user is prompted to sign in and then redirected to authentication page I want to avoid this page:
 
 
 
and just want the user to be redirected back to the chat window. One of the solutions I saw was using sample canvas https://github.com/microsoft/CopilotStudioSamples/blob/master/BuildYourOwnCanvasSamples/3.single-sign-on/index.html but would I have to create a new authentication using MSAL instead of leveraging the authentication I configured inside power virtual agent?
 
 
  • anonymous882 Profile Picture
    anonymous882 18 on at
    How to bypass validation code after authentication is successful?
    @adilei As per documentation, I granted the app Delegate User.Read permissions. I am signed in but still have the log in prompt from copilot studios. 
     
    From my understanding, if the user is signed in using MSAL the sign in from the copilot studios should be bypassed? or would I have to turn off manual authentication from copilot studios's side or simply change the sample code to prompt the sign in first and then start the conversation? 
  • adilei Profile Picture
    adilei on at
    How to bypass validation code after authentication is successful?
    The sample is a bit tricky, as it starts the conversation before the user is signed-in. From the image, it seems you are signed-in, but can't be sure.
     
    Otherwise, it's possible that some misconfiguration makes copilot studio reject the token. How did you set up your canvas app registration in terms of permissions?
  • anonymous882 Profile Picture
    anonymous882 18 on at
    How to bypass validation code after authentication is successful?
    @adilei Thank you for your help, I was able to configure it but now I have two log in prompts like shown in the documentation, I thought by configuring front end app registration it will sync with the back end one and fetch the token from authentication and avoid that login request from the bot. Is there a way to solve this issue as documentation does not offer a solution.
     
     
     
     
     
     
     
     
    Screenshot of logging in using validation code
  • adilei Profile Picture
    adilei on at
    How to bypass validation code after authentication is successful?
    Yes, you would want a second app registration for the custom canvas. Here are the instructions: Configure single sign-on with Microsoft Entra ID - Microsoft Copilot Studio | Microsoft Learn

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Community Update…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,585

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,336

Leaderboard

Featured topics