Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Creating a name field that defaults to the logged in user

(0) ShareShare
ReportReport
Posted on by

Hi all,

Still a novice here.  I have an app that populates a Sharepoint list which includes a column for a user.  This column should default to the logged in user.  For the app I tried to use the Default field tried to use something like:

Office365Users.MyProfileV2(User().Email)

 

Wasn't sure if Email is correct or if it should be FullName.  Either way, I can't get it to default to the logged in user name (or ID?).  Any suggestions?

Categories:
  • nitto619 Profile Picture
    on at
    Re: Creating a name field that defaults to the logged in user

    Hi Rob,

     

    I do have Office365Users connected to the app.  The issue sounds like it could be a type/format issue on how to get it to work with Sharepoint List "Person or Group" type. I do get this error:

    nitto619_0-1674162814372.png

     

  • RobElliott Profile Picture
    10,118 Super User 2025 Season 1 on at
    Re: Creating a name field that defaults to the logged in user

    @nitto619 make sure you add the Office 365 Users connector into your app then you can use Office365Users.MyProfile().Mail which will get the email of the current logged in user. To get their firstname and surname you would use Office365Users.MyProfile().GivenName&" "& Office365Users.MyProfile().Surname as in the image below

     

    screenshot190123.png

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard