I have a canvas app that calls a flow. The first non-variable action in the flow is creating a sharepoint list item. This action fails for some users. If they refresh the power app and try again, it works. Or, if I access the failed run and click resubmit, it works. I've made sure that they have contribute access to the list, and there are no premium connectors in this flow.
The error message is:
Error from token exchange: Runtime call was blocked because connection has error status: Enabled| Error, and sharepointonline is in the block list. Connection errors: [ParameterName: token, Error: Code: Unauthorized, Message: 'Failed to refresh access token for service: sharepointonlinecertificatev2. ... Error: Failed to acquire token from AAD: {"error":"invalid_grant","error_description":"AADSTS700082: The refresh token has expired due to inactivity. The token was issued on ... and was inactive for 90.00:00:00.
IT has confirmed this, saying that they can see that the refresh token has expired. The question is how is it possible for the user to access the power app, click through several screens to get to the screen with the button that starts the flow, all with an expired refresh token? If the user refreshes their browser, they apparently get a new refresh token, and the flow completes successfully.
Any ideas for addressing this, other than popping up a message telling users to refresh their browser?