Our organization uses a DisplayName
that is different from FullName
for all things Microsoft.
Hence FullName
maybe something like "John Smith" while DisplayName
is "Smith, John (Accounting)"
I know I can display the FullName
of the current user in a PowerApp form (for SharePoint) by using User().FullName
Is there a way to similarly display the DisplayName
in a form? I know that PowerApps has access to the display names - they show up when I have a person picker combo box, for instance.
I found a workaround by adding a connection to Office365Users and using the following command Office365Users.MyProfileV2().displayName
. I would prefer to avoid this, though, as it sets off a connection permission dialog when a user first accesses the app.
There isn't a direct way other than what you have suggested already. But there is a workaround involving Power Automate flow. Follow the below steps:
PowerApps V2
.Get User Profile
step (Office365User) and pass the user email id as the Principal user ID into the step.Respond to PowerApps
step and return the DisplayName
of the user.OnStart
property of your app call the flow pass the currently logged-in user email to the parameter and store the response in a variable.Then you can use that variable wherever you want to display. Since you have configured run as a property of the flow to specific connection reference, hence user won't see any connection reference pop-up related to Office365Users.