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?
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.
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.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional