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


Power Automate Community User Group Member Badge

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


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,000)