简体   繁体   中英

Microsoft Power Virtual Agents - error in Power Virtual Agents Flow Template

I am trying to code this Microsoft Virtual Agent in Microsoft Teams using this example:

https://powerusers.microsoft.com/t5/Power-Virtual-Agents-Community/Getting-User-Details-To-Use-In-Power-Virtual-Agents-In-Teams/ba-p/744934

BTW - I have other topics on the chat bot working - it is just this one topic that tries to get detailed user information - that is not working

I get it coded, run it, and it throws an error: Error: Action 'Get_user_profile_(V2)_2' failed Error Details: Bad Request - Error in query syntax.

Microsoft Teams gives me the user name. To get the user's email - I call SearchForUsers() - which properly returns information about the user specified by the user name. SearchForUsers() returns a list (or array) of users. In this case - there is only one user in the list, but still a list, so in the next call to GetUserProfile() I specify "first" to get one user out of the list. The property "UserPrincipalName" does contain the correct email to lookup the user profile. So SearchForUsers() appears to output the correct values.

My input to GetUserProfile is: first(outputs('Search_for_users_(V2)')?['body/value'])?['UserPrincipalName']

It appears that there is something wrong with this query - but I do not see the problem.

Any ideas? Thanks

Call to GetUserProfile()

Instead of passing in display name - pass in UserID. Then you do not need the call SearchForUsers()

Action

Flow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM