web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : QUzrvt1wmDAO2W0moD/c7s
Power Apps - Building Power Apps
Unanswered

User() function not loading properly

Like (0) ShareShare
ReportReport
Posted on 15 Mar 2023 15:18:46 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 30 Mar 2023 at 14:31:35
    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 15 Mar 2023 at 16:08:46
    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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete