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 / how to get user value ...
Copilot Studio
Answered

how to get user value back to PVA from Bot Framework Composer?

(0) ShareShare
ReportReport
Posted on by 28

Hi All,

 

how to get user value back to PVA from Bot Framework composer? I am creating PVA bot and i am also using Bot framework Composer to create adaptive card to show to my PVA chatbot. i also have to do some operation with power flow but i am not able to get the user value to PVA chat about.

 

Need help on this.

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,876 Most Valuable Professional on at

    Hi @anuj89822,

     

    Can you maybe share a couple of screenshots to show what value you want to get back. Is it something from the flow? Or do you just mean the details of the user interacting with the bot?

     

    If it is the latter you should be able to use the bot.UserId & bot.UserDisplayName. After you have enabled authentication on your bot in the settings.

     

    botusernameanduserid.png

  • anuj89822 Profile Picture
    28 on at

    Hi, 

     

    I am trying to get the value from Bot frame work composer to PVA. 

     

    Regards,

    Anuj

  • Verified answer
    anuj89822 Profile Picture
    28 on at

    Hi, i got the answer for this. 

    • you need to create global variable in you pva. that can be created in any topic and select as external source can access too

    anuj89822_0-1626501569115.png

    • in bot framework console you need, you need to set properties and provide variable name as virtualagent.same name given in PVA and provide the value which you want to pass. and that will work.
  • nk1ng Profile Picture
    71 on at

    How to you get an array to it?  I am struggling with o365, search for profiles v2...   

  • anuj89822 Profile Picture
    28 on at

    @nk1ng if you can explain more. I can try to explore.

  • nk1ng Profile Picture
    71 on at

    Sure, basically, I am trying to make a topic that will allow you to enter a name and you will get adaptive card carousel for the search term - basically, global address book. 

     

    I am having issues trying to load the return from "Search for user (V2)" to the composer.  I was not able to pass an array back from the flow so with concat I just appended everything to a string but now it's a string, need to be an array or json or something to parse it into the adaptive cards in the composer.  That made sense?  

     

    Here is what I am trying but how to you get the json into the composer?

    nk1ng_0-1626797350419.png

     

    Everything worked when I statically hardcode into the composer but I want the flow from the search_for_users_(v2) instead... 

     

  • anuj89822 Profile Picture
    28 on at

    @nk1ng do let me know, if i understand you issue correctly.

    Hi,  I am passing two global variable value from PVA to bot framework composer. created global variable in PVA and using same variable name in framework composer. below screenshot for your reference. 

    anuj89822_0-1626938150564.png

     

  • nk1ng Profile Picture
    71 on at

    I got that however I need a json or array to run foreach in the composer as I want to get multiple entries from the Search_for_users_(v2) flow..

  • nk1ng Profile Picture
    71 on at

    Welp, I finally got it.

    Flow (and set for the 'return' to be global in PVA):

    nk1ng_3-1627562804816.png

     


    Composer (Create Tab; I used json func here for the string return from PVA to go back to an array in composer):

    nk1ng_4-1627563094893.png

     

    Composer (Bot responses tab):

    nk1ng_1-1627562536034.png

    and

    nk1ng_2-1627562595348.png

     

    The only caveat now is the image for the user, which will work in the test bot however when you publish it to teams won't show the image.  Still working on that...

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 304

#1
Valantis Profile Picture

Valantis 304

#3
11manish Profile Picture

11manish 170

Last 30 days Overall leaderboard