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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

User properties

(1) ShareShare
ReportReport
Posted on by 10

Hi,

 

How to get the following property values from the SharePoint User object and send it across email?

  • First Name
  • Last Name
  • Mobile No
  • Department
  • Email
Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

     

    https://docs.microsoft.com/en-us/connectors/office365users/

     

    Office365users connector gives plenty of information for any user.

  • Verified answer
    ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    Here is a simple example that does what I believe you want to do.

     

    I am using the Get User Profile connector to retrieve user profile information.  I am using the email address of the user who created the list item as the user for which I want to retrieve properties.

     

    First and Last name don't normally appear - I used the following expressions to get the first and last names.  The expressions splits the display name where it sees a space and creates a table with the first and last names.  The "first" function gets the first row in the table and "last" gets the last row.

    First name:

    first(split(body('Get_user_profile_(V2)')?['displayName'],' '))

     

    Last name:

    last(split(body('Get_user_profile_(V2)')?['displayName'],' '))

     

    Prop1.png

     

    If this solves your problem, please mark you question as Solved.

     

    Scott

  • CindyZ Profile Picture
    on at

    Thanks, Scott! 

     

    This has been a huge help!  However, I am getting a comma at the end of my name no matter what I do.  It is not in my text. 

     

    FName LName,

     

    Any idea why?2018-08-13_12-25-35.jpg2018-08-13_12-24-15.jpg

  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @CindyZ:

     

     I don't know why you are getting the comma, but I do have two suggestions:

    1) Wrap the expression that is giving you the comma in a replace() expressions and replace the comma with nothing ('')

    2) Delete and recreate that part of your email

     

    Please let me know if either solution works for you.

     

    Scott

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey @ScottShearer  

    last(split(body('Get_user_profile_(V2)')?['displayName'],' ')) - is only giving me the middle initial "L" and your other option is only giving me the last name. Any ideas? Thanks!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @ScottShearer NM I figured it out - last(split(body('Get_user_profile_(V2)')?['GivenName'],' '))

     

  • CindyZ Profile Picture
    on at

    @ScottShearer Late Reply here, but did want to get back and thank you for your help on this!  It worked! 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard