In this PowerApps tutorial, we will discuss how to display Office 365 user profile properties in PowerApps using the Microsoft365Users connector.
Display Office 365 User Profile Properties in PowerApps
So before going to start, you have to connect your PowerApps App with Microsoft365Users connector.
You can create a PowerApps canvas app (Tablet layout or Phone layout).
Go to the Data and search Microsoft365Users and try to connect it. Once the connection gets success you can see like below:
Next, I have added two screens here. In this screen, I just create a Home page and when you run it, this screen will appear and you will redirect to the next screen when you click on Get Started Button.
Here I have added Labels and Image control to bind the data which will retrieve from the user profile.
Now everything you will get from Micrisoft365Users.UserProfile(userID) formula.
The same steps you can follow for other controls as well. Here I bind Email id in the label control. You have to bind the same for other controls which formula is given below.
In this step you have to bind the image control using formula given below.
Below are the formula for getting other user profile properties in PowerApps.
Microsoft365Users.UserProfile(User().Email).TelephoneNumber
Microsoft365Users.UserProfile(User().Email).OfficeLocation
Microsoft365Users.UserProfile(User().Email).Department
Microsoft365Users.UserProfile(User().Email).JobTitle
Microsoft365Users.UserProfile(User().Email).Country
Microsoft365Users.UserProfile(User().Email).DisplayName
Microsoft365Users.UserProfile(User().Email).Mail
Office365Users.UserProfile(User().Email).City
Office365Users.UserProfile(User().Email).CompanyName
Office365Users.UserProfile(User().Email).GivenName
Office365Users.UserProfile(User().Email).Id
Office365Users.UserProfile(User().Email).MailNickname
Office365Users.UserProfile(User().Email).mobilePhone
Office365Users.UserProfile(User().Email).PostalCode
Office365Users.UserProfile(User().Email).Surname
Office365Users.UserProfile(User().Email).UserPrincipalName222
Office365Users.UserProfile(User().Email).AccountEnabled
Office365Users.UserProfile(User().Email).BusinessPhones
You may like following PowerApps tutorials:
- PowerApps twitter connector example
- How to show RSS feed in PowerApps
- PowerApps Examples: Restaurant management system
- How to create calculator in PowerApps
- Fetch azure groups in PowerApps using PowerApps Azure AD Connectors
- PowerApps Combobox SharePoint List Example
- How to view PDF files using PDF Viewer in PowerApps
- PowerApps form benefits for SharePoint
- Automatically scroll Gallery control in PowerApps
- Power Apps WeekNum and ISOWeekNum Function
In this PowerApps tutorial, we discussed how to get user profile properties in PowerApps Canvas App. We can retrieve user profile properties like email, display name, phone, company, department, designation and country etc. in PowerApps.
Rajkiran is currently working as a SharePoint Consultant in India . Rajkiran having 7+ years of experience in Microsoft Technologies such as SharePoint 2019/2016/2013/2010, MOSS 2007,WSS 3.0, Migration, Asp.Net, C#.Net, Sql Server, Ajax, jQuery etc.He is C#Corner MVP (2 Times).
This is great, thank you.
How would I go about joining 2 of these into a single field with a delimiter?
Using your example, return the values for Designation; Department
Thank you. This is helpful. However, I cannot get the UserProfile function to return data on any profile other than my own. Is there something about the permissions that has to be changed?
How can we get custom profile properties in PowerApp?