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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How can we handle refr...
Power Automate
Suggested Answer

How can we handle refresh token expired for user triggered flows

(6) ShareShare
ReportReport
Posted on by 89

What are the best practices to avoid the "refresh token has expired due to inactivity" error for workflows that are triggered by the user, like from a Power App button or a "For a selected item" trigger. I think what is happening is the refresh token is being generated when the user opens the Power App or triggers the "For a selected item" from SharePoint. Since some of these workflows are rarely triggered by individual users, when that user comes back more than 90 days to the App or SharePoint list and tries to start the flow it fails because it has been over 90 days. The Power App and "For a selected item" triggers only prompt to "allow access" the first time and do not have a way to ask the user for a new token. How do you prompt the user to reauthorize the connections? How do you avoid getting this error for rarely used workflows?

 

Here is a simple example of the issue, a simple flow that sends an email using a For a selected item trigger in SharePoint:

Screen Shot 2021-04-22 at 3.24.09 PM.png

The workflow is setup to allow anyone with permissions on the SharePoint list to run it. User selects an item in SharePoint and runs a Power Automate trigger for that item.  SharePoint prompts the user to allow access since this is the first time they have run this trigger. Over 90 days later this same user comes back and tries to run that trigger again on an item. They are not prompted to reauthorize the connection and do not see any error when they run the workflow. The owner of the workflow sees the flow failed with the error "refresh token has expired due to inactivity". 

Categories:
I have the same question (2)
  • wfindlay Profile Picture
    25 on at

    This is a real problem. Has anyone found a solution?

  • biterbit Profile Picture
    408 on at

    I have not found any solution to this issue. I have hundreds of users and every week dozens of flows fail silently with these user authentication errors. The user sees no error since the flow never completes. I do not see any error as my error trapping code is not triggered. I usually find out there's an issue when I receive the weekly flow errors report.

    I have failed to find anyone with a solution to this.

  • JonathanTeo1 Profile Picture
    27 on at

    I am also experiencing a similar issue where the refresh token is expired for users and does not the flow to perform any actions on SharePoint.

    So far I've not been able to find any solutions to this issue

  • Suggested answer
    DJ-10010821-0 Profile Picture
    on at
    I have encountered the same issue recently. I have few Power automate flows that are triggered by the user through a Power App button. I have 30+ users for this Power App. The More and more flows failed as users are reaching 90 days from the first time they logged in to the app. Finally, I've found a way to fix this issue. You can add 'Office 365 Outlook' to the data of the app. Save the app and publish the app. When the user log in to the app, click refresh to get the latest version of the app. And allow all the connections popped up.
  • JonathanTeo1 Profile Picture
    27 on at
    I've found the only solution for this is to set run-only users for your connection references.
    Ideally this should be from whichever service account you are using to run the flows.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Expiscornovus Profile Picture

Expiscornovus 199 Most Valuable Professional

#2
David_MA Profile Picture

David_MA 194 Super User 2025 Season 2

#3
harshdeol Profile Picture

harshdeol 167 Moderator

Last 30 days Overall leaderboard