Power Apps - Adding user profile information to your form

User Profile Information

Microsoft PowerAppsAdding user profile information to your form

Make sure you have added the "Office 365 Users" data source as defined previously. You can then easily populate form fields or labels with User Profile information.

Example: Office365Users.MyProfile().Mail will give you the current users Email address. If you want to put this value into a form field, you would put the equation into the "Default" value for that form field. For putting dynamic values like this into a label field, you would put these formula into the Text field of the label. Here are all of the User Profile values you can access with this method:

  • Office365Users.MyProfile().City
  • Office365Users.MyProfile().CompanyName
  • Office365Users.MyProfile().Country
  • Office365Users.MyProfile().Department
  • Office365Users.MyProfile().DisplayName
  • Office365Users.MyProfile().GivenName
  • Office365Users.MyProfile().Id
  • Office365Users.MyProfile().JobTitle
  • Office365Users.MyProfile().Mail
  • Office365Users.MyProfile().MailNickname
  • Office365Users.MyProfile().mobilePhone
  • Office365Users.MyProfile().OfficeLocation
  • Office365Users.MyProfile().PostalCode
  • Office365Users.MyProfile().Surname
  • Office365Users.MyProfile().TelephoneNumber
  • Office365Users.MyProfile().UserPrincipalName
  • Office365Users.MyProfile().AccountEnabled
  • Office365Users.MyProfile().BusinessPhones

Most SWA forms have the same User Profile data at the top of most every form:
First Name Last Name - EmployeeID - Email - Location

The code to display this would look like:
Office365Users.MyProfile().GivenName & " " &
Office365Users.MyProfile().Surname & " - " &
Office365Users.MyProfile().MailNickname & " - " &
Office365Users.MyProfile().Mail & " - " &
Office365Users.MyProfile().OfficeLocation

To place these on a form, place a label on the form and enter in the above code into the text area.

The Label on the top right of this form has this set and looks like: