Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

default to user that's logged in email

Posted on 26 Nov 2024 14:32:10 by 477
I have a form within powerapps tied to a sharepoint list.  I have a field that I just want to default to the user that's logged in's email address.  I tried User().Email in the default property  but it's giving error message.  Note that the column in SharePoint is set as a people picker and I've also uploaded office 365 data into the App.  Any help is appreciated.  
 
Categories:
  • Verified answer
    mmbr1606 Profile Picture
    mmbr1606 9,852 on 26 Nov 2024 at 14:37:23
    default to user that's logged in email
    hey
     
     
    for a people picker you can not set it this way.
     
    you need somethung like this:
     
    {
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        Claims: "i:0#.f|membership|" & User().Email,
        DisplayName: User().FullName,
        Email: User().Email
    }
    
    or you can add the office365 users connector and use this:
    Office365Users.MyProfile()
    if that helped please mark as verified answer
     
     
     
    cheers

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,129

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,797

Leaderboard