Skip to main content
Community site session details

Community site session details

Session Id : kbARPFd2+KIfk1YzyK9MBk
Copilot Studio - Publish & Channel Management
Unanswered

Error retrieving user info in teams using PVA app id

Like (0) ShareShare
ReportReport
Posted on 28 Apr 2020 04:54:58 by 2

I have published a PVA bot skill to a teams channel using the app id that is provided in the PVA platform. 

I used this app id and connected the skill to the teams channel, I am able to run the skill.

 

However, I am not able to query the details of the user logged in to teams. This works when I deploy the same skill bot using the app id from the azure portal. 

The code which queries the user info - attached Code_snippet.png.

The error message - attached ErrorMessage.png.

 

Exact error message:

"Microsoft.Bot.Schema.ErrorResponseException: Operation returned an invalid status code 'Unauthorized' at Microsoft.Bot.Connector.Conversations.GetConversationMembersWithHttpMessagesAsync(String conversationId, Dictionary`2 customHeaders, CancellationToken cancellationToken) at Microsoft.Bot.Connector.ConversationsExtensions.GetConversationMembersAsync(IConversations operations, String conversationId, CancellationToken cancellationToken)"

 

Thanks,

Shinal

  • CU22081450-0 Profile Picture
    Most Valuable Professional on 22 May 2020 at 02:05:05
    Re: Error retrieving user info in teams using PVA app id

    Hi @Anonymous ,

     

    You can create the Authentication to get the user token and do things using this token (like getting SharePoint folders and files).

    To add the Authentication, you can see this documentation: https://docs.microsoft.com/en-us/power-virtual-agents/advanced-end-user-authentication

     

    Regarding other connections, you can use the Power Automate to get more details inside SharePoint, Azure, or another platform, and return the data to PVA using this documentation: https://docs.microsoft.com/en-us/power-virtual-agents/advanced-flow

     

    And finally, in Jun 2020 will be available the Single Sign-on inside the PVA: https://docs.microsoft.com/en-us/power-platform-release-plan/2020wave1/power-virtual-agents/single-sign

  • CU22081450-0 Profile Picture
    Most Valuable Professional on 22 May 2020 at 01:45:49
    Re: Error retrieving user info in teams using PVA app id

    Hi @Shinal ,

     

    Are you getting this issue yet?

    Maybe PVA has a limitation to get users context, but I will tag the PVA STAFFs to help you.

    @ggupta @Diganta 

  • Community Power Platform Member Profile Picture
    on 20 May 2020 at 00:57:47
    Re: Error retrieving user info in teams using PVA app id

    Is there anyone else who is building bots from a source where the user is already signed on? This seems like a somewhat common use case. Examples:

    • I'm logged into Teams and want a bot to search a Sharepoint repository I have access to.
    • I'm a retail consumer logged into a n eCommerce site and logged in with Azure B2C (connected with a Google or Microsoft ID) and want the bot to check on the status of one of my open orders. (Web chat client)

    Is it possible to pass the credential from the editing container to PowerVA and use it to execute downstream processes?

     

    As Shinal points out, this works when the skill is embedded in a custom bot, but not if that same skill is used within PowerVA.

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 468 Super User 2025 Season 2

#2
stampcoin Profile Picture

stampcoin 52 Super User 2025 Season 2

#3
trice602 Profile Picture

trice602 46 Super User 2025 Season 2

Featured topics

Loading complete