Display Current Logged In User in SharePoint Online NewForm – PowerApps

I was looking for a quick solution to auto-populate a Person and Group field with Logged in user’s email.

The easiest way to achieve that is a simple two-step process.

  1. Add the following on OnVisible Property of your form. See the screen below.

Set(myself, User())

2. Add the following in DefaultSelectedItems property of Control’s DataCard (select the actual Person & group control and not the entire field). See the screen below.

If(SharePointForm1.Mode = FormMode.New,
{
DisplayName: myself.FullName,
Claims: “i:0#.f|membership|” & myself.Email
},
Parent.Default)

3. Publish it and test it.