cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mitbro
New Member

Retrieve email address from authenticated user profile

Hi Everyone,

I have a question that I'm sure other people would have but I can't find it asked anywhere...

I have a PVA bot published through Teams with "Teams only" authentication turned on. It's great that the bot can already detect who it is speaking to, I just want the bot to be able to know the email address of the person it is talking to so when it needs to send an email to the person, it doesn't have to ask.

 

TLDR:

Does anyone know how to retrieve the email address of the authenticated user and store as a variable? 

1 ACCEPTED SOLUTION

Accepted Solutions
renatoromao
Super User
Super User

Hi @Mitbro ,

 

Today, the authentication return back only UserDisplayName and UserID inside the Teams.

https://docs.microsoft.com/en-us/power-virtual-agents/advanced-end-user-authentication#authenticatio...

 

If you want to improve and get more details about this current user, you need to follow the steps below:

 

1- Create an action inside your Greeting topic or another topic that you want

2- Connect this action with a new workflow inside the Power Automate

3- Inside your Power Automate workflow, get the User data using the Microsoft Graph

You can understand better inside these articles:

https://powerusers.microsoft.com/t5/Connecting-To-Data/Can-I-access-Microsoft-Graph-API-via-Flow-HTT...

https://social.technet.microsoft.com/wiki/contents/articles/53583.power-automate-flow-calling-ms-gra...  


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.650 students) : English | Português

View solution in original post

1 REPLY 1
renatoromao
Super User
Super User

Hi @Mitbro ,

 

Today, the authentication return back only UserDisplayName and UserID inside the Teams.

https://docs.microsoft.com/en-us/power-virtual-agents/advanced-end-user-authentication#authenticatio...

 

If you want to improve and get more details about this current user, you need to follow the steps below:

 

1- Create an action inside your Greeting topic or another topic that you want

2- Connect this action with a new workflow inside the Power Automate

3- Inside your Power Automate workflow, get the User data using the Microsoft Graph

You can understand better inside these articles:

https://powerusers.microsoft.com/t5/Connecting-To-Data/Can-I-access-Microsoft-Graph-API-via-Flow-HTT...

https://social.technet.microsoft.com/wiki/contents/articles/53583.power-automate-flow-calling-ms-gra...  


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.650 students) : English | Português

View solution in original post

Helpful resources

Announcements
V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

PVA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,964)