Introduction
Authentication can be enabled in Power Virtual Agents to allow the user to log in for personalized experiences. Power Virtual Agents utilizes OAuth2 Authentication to provide a robust and secure authentication experience directly through the Power Virtual Agent conversation.
Power Virtual Agent and have seen a high impact in reducing the number of cases
with generic questions your Customer Support Team is receiving. As a direct result, the business cost around customer support has been directly reduced.
The user has logged in to Power Virtual Agents , Power Automate to pass that
authentication token to other systems, to allow the bot to act on behalf of the logged in user to retrieve data or take action. Flow that passes the authentication token from the bot to the Microsoft Graph, to retrieve and return further user details.
In the previous blog we seen the how to add the flow action to the Power Virtual agent. https://srinathpega.com/2022/07/12/power-virtual-agents-13-authentication-with-power-automate-part-1/ and Creation a flow to pass the authentication token https://srinathpega.com/2022/07/13/power-virtual-agents-14-authentication-with-power-automate-part-2/
In this Blog will see how add the Power Automate Flow which pass the authentication token to Power Virtual Agents to Authenticate the user to the chatbot.
Add your flow into your conversation topic
- Go to https://powerva.microsoft.com/
- Select the bot and Environment from the top right corner.

3. Click on Topics and open the topic to add the Power Automate Flow.

4. Click on add new node and click on call on action and select the Power Automate Flow for pass the authentication token to Chatbot.

5. The Power Automate Flow will add and asking the input Variable {x}UserToken(text) which we added in the Power Automate Flow , Select the Input variable as bot.AuthToken.

6. Output Variables are from Power Automate Flow.

7. Now Add the Message Node to it and add the massage to it with variables.

8. Click on Save.
Test The Topic on the ChatBot.
9. Enter Login the Chat and click on send.

10. Click on Login on the chat and it will opens in new tab, and give the validation Code , copy that code.

11. Past into the chat and click on send.

Hope you learn something, Thanks for Reading 📖!
Happy Power365ing!