web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get UPN from Microsoft...
Power Apps
Unanswered

Get UPN from Microsoft Entra ID and send mail

(1) ShareShare
ReportReport
Posted on by 2

I have a model driven app with standard table 'tblGenAITracker'
primary key column with logical name: genai_usecasetitle
then there is a Lookup column with logical name: genai_ucowner
Related table is [Microsoft Entra ID/aaduser] which is virtual table connected to my organization Active Directory.

So in my Main Form of tblGenAITracker table, which I have names as 'Gen AI-Submission'.
In this form I added genai_ucowner with default view of Microsoft Entra ID. So when user search any employee of my organization user can select it and in that Form I can show case Employee's jobtitle, officelocation, userprincipalname in 'my Main Form of tblGenAITracker table'.

Now when user save & close this record I want to send mail to email id which is in 'userprincipalname ' column of Microsoft Entra ID table. So I created Power Automate flow.
This flow will get trigger when new row added or modified in tblGenAITracker .
But Email id which I need is in 'Microsoft Entra ID'[userprincipalname ] column which I can't get it.
Please suggest me solution.

I have the same question (0)
  • ivan_apps Profile Picture
    2,187 Moderator on at

    Userprincipal name is usually the email address but not always. External or guest users will have a different value and your Entra ID policies could affect username. There is an Email address property that you can use that directly ties to the Entra ID email field.

     

    having said that it seems power automate can’t query virtual tables so you’re out of luck for a straightforward update. What you can try to do is created a classic Dataverse workflow (instant/real-time) that runs after the record is created or after the virtual entity field is updated. This workflow should be able to capture the Entra Id display name of the person and drill into its properties (like email) and get a copy of it. Then create a new field in your table for the selected user’s email (standard string field). Power automate should be able to read that no problem and since you are running a real-time workflow before your power automate asynchronous email flow, you ensure the data copy is done first. 

    hope this helps!

  • AkshayKadoo Profile Picture
    6 on at

    I already tried to create power automate flow.
    Initiated flow "when a row is added, modified or deleted" on my dataverse table.
    Then "Get a row by ID" for Row ID: triggerBody()?['genai_usecasetitle']
    Which is my Primary column.

    But in return I got 404 error:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>404 - File or directory not found.</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;} fieldset{padding:0 15px 10px 15px;} h1{font-size:2.4em;margin:0;color:#FFF;} h2{font-size:1.7em;margin:0;color:#CC0000;} h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF; background-color:#555555;} #content{margin:0 0 0 2%;position:relative;} .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;} --> </style> </head> <body> <div id="header"><h1>Server Error</h1></div> <div id="content"> <div class="content-container"><fieldset> <h2>404 - File or directory not found.</h2> <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3> </fieldset></div> </div> </body> </html>

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard