Showing results for 
Search instead for 
Did you mean: 
Level 8

userProfile Variable

Just a heads up if you find yourself in a similar position.

I have a global variable called userProfile which is set on APP start to the current user,


Set(userProfile, Office365Users.MyProfile())


If the current user is an APP owner, then they can switch to debug mode and select the current user, I do this on clicking the users image.

If(_IsAdmin, Set(userProfile, {});
Set(_Debug, !_Debug);
If( _Debug, 
Set(userProfile, Office365Users.UserProfileV2("selected user email")),
Set(userProfile, Office365Users.MyProfileV2())


However, when you then look at the variable you will notice a really odd thing which becomes very annoying.. The properties of the variable are duplicated and then dropped to lowercase, and the initial properties are blank and ProperCase..

This means all your lookups and filter fail, as the are looking at the wrong case I.E userProfile.Mail becomes userProfile.mail etc...

This is because the two versions of the MyProfile(), UserProfile() and MyProfileV2() and UserProfileV2() provide different cases on the properties.

This is probably intentional but it is easy to miss

Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 149 members 4,450 guests
Please welcome our newest community members: