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.760 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.760 students) : English | Português

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

Canadian Cloud 2022 768x460.png

Register for a free PVA chatbot creation workshop.

Learn how to respond rapidly to your customers and employees at scale, using intelligent conversational chatbots.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,857)