I have about half a dozen powerapps that call flows and all of them have this issue now. 2 years ago we didn't have this problem and now it's all but made power platform useless for us for the last 6 months. Hundreds of users use my powerapps and this bug has caused me so many headaches it probably boosted the share price for the company that owns tylenol.
I have a ticket open with Microsoft and it's been months with no resolution and the customer service is very poor. There is no resolution in sight.
I believe what is happening is that when an user signs into their microsoft account, the powerapp application will try to see what services it uses and attempt to see if those connections are valid or not.
When you first sign into a powerapps application that uses a flow, it will ask the end user to make connections for those services, such as outlook and sharepoint. However, something in powerapps is broken where the system doesn't check this for all users. I have witnessed some end users, after 90 days of not signing into the application itself, get a prompt to remake their connections to outlook.
However, about 60% of users do not get this pop-up when they sign in and the powerapp seems to work until they press a button that calls a flow. The flow will see that the token is expired and the flow will fail. Nobody at Microsoft seems to understand this and no one seems to have a solution.
I have made a work-around by adding an "on-fail" step on sharepoint/outlook steps in powerautomate that will send an HTTP call (premium connector by the way, so this workaround will actively cost you money) to another flow that is triggered by "when a HTTP request is recieved " that uses the flow that uses tokens from the service account.
Powerapps uses the tokens of the end user and a flow that is triggered by powerapps will use the tokens of the end user. If the flow fails, the on-fail step will call the HTTP request to a child flow that isn't triggered by powerapps. Thus the child flow will use the tokens from the account that owns the flow. This works 100% of the time and is the only way I can get anything to work now.
The problem is that it doubles the amount of flows you have, is a workaround to the problem, and some steps simply needs to come from the end user and not another account. Also the HTTP request is a premium connector.
PLEASE let me know if have any solution to this problem. I have actively been working with Microsoft reps for months with no resolution.
My proposed fix would be for Microsoft to address why the powerapp can't tell that connections to services are expired and make a pop-up when the end user signs into the powerapp to re-do the invalid connections.
If you look at the issue, it only has "workarounds" that aren't scalable solutions for a fundamental problem (
https://admin.powerplatform.microsoft.com/knownissues/4455860) but it is somehow "Resolved" - AKA they can't be bothered to fix it or the communication between departments is so bad, no one knows what the solution is.