In this post, we build a profile card with the current user’s name, email address, and office phone number as shown below. This can be useful for a portal page that includes a link to where the user can modify their information.
The first thing to do is to add a connection to the data source to the App of the type Office 365 Users as shown below.
The profile picture is populated by setting the Image property of an Image control with the following formula.
The user’s name is populated by putting the following into the Text property of the Label control. It combines the value of the Given property (i.e. first name) and the value of the Surname property (i.e. last name).
Office365Users.MyProfile().GivenName & ” ” & Office365Users.MyProfile().Surname
The email address can be set by putting the following formula in the Text property of a Label control.
The phone number (in this case the work number) is populated by putting the following formula into the Text property of a Label control. You will notice that the function involves getting the first value (in case there are multiple phone numbers).