Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

User() function not loading properly

(0) ShareShare
ReportReport
Posted on by 64

Hi guys

 

Over the past couple of weeks, we've had some rare instances where the User() function is not serving up the App user's details.

 

We have a patch to a SharePoint list at some point, and for the part where we're writing to a person field and state the 'Claims', we use a variable (defined in the OnStart of the App) which concatenates i:0#.f|membership| with User().Email.

 

Some users have seen the error message: The requested operation is invalid. Server Response: [our SP List] failed: The specified user i@0#.f|membership| could not be found - which suggests to me that the User().Email part is blank and it's trying to just pass the variable with only the i:0#.f|membership| string within it.

 

It's a highly used App that has been in place for almost a year, with hundreds of uses a day - but there's only been 3 or 4 instances across the past fortnight, so I'm not too concerned about it - in every instance reported to us, we've asked them to refresh and it's not reoccurred.

It's just odd that it's started happening all of a sudden (nothing else has been added to the OnStart during this period) and I'm wondering if anyone else has run into the same issue?

Categories:
  • Socrates Profile Picture
    64 on at
    Re: User() function not loading properly

    Thanks @Drrickryp 

     

    I've moved some items (such as this) from the OnStart, to the OnVisible of a page but it still seems to be occurring. I'm not too definitive on that statement as I don't know 100% that everyone is on the latest published version of the app (although Microsoft seemed to have introduced the prompt on desktop too finally!), but I'll keep an eye on it for now.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: User() function not loading properly

    @Socrates 

    Microsoft is in the process of deprecating the App.OnStart property.  Please see this video to prepare for the migration.  https://www.youtube.com/watch?v=EjMfQsRkBf8 .  I have been using the new Named Formulas feature and it is working very well.  It needs to be activated in the Settings.  See https://powerapps.microsoft.com/en-us/blog/power-fx-introducing-named-formulas/  for the details.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard