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 / Constant authenticatio...
Power Automate
Unanswered

Constant authentication issue with O365

(2) ShareShare
ReportReport
Posted on by

I have setup a number of Flows that users O365 application (SharePoint, OWA, Dynamics), after a few days, Flows stop working due to authentication error (Error 401) and I need to re-connect the steps. This issue has happened a few times. Is this a known problem? Any workaround?

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    on at

    Hi @Anonymous,

     

    Please take a look at the connections created under Microsoft Flow:

    Manage connections in Microsoft Flow

    Make sure the connections are all good.

    Besides, there is thread talking about error 401 with tweet, see:

    https://powerusers.microsoft.com/t5/Flow-Forum/Post-a-tweet-failing-with-a-401-Unauthorized-error-message/td-p/7712

    And connections built under office 365 on my side works good till now, could you please share more details regarding the error message, and the Flow configuration?

    Regards

  • Community Power Platform Member Profile Picture
    on at

    Thanks @v-micsh-msft.

     

    I am waiting to reproduce the issue and paste it here. The issue is different from your referenced forums post and I believe it is to do with Office365 2FA. 2FA is enabled on all Our o365 accounts. It seems like every now and then the access token is revoked and Flow must get re-authorised.

  • Community Power Platform Member Profile Picture
    on at

    Issue happened again acroos *all* Flows that are connected to our Office365 account. See the screenshot below

     

    flow_auth_error.PNG

     

    And here is the error message body JSON response:

    {
      "status": 401,
      "message": "{\"error_description\":\"Invalid JWT token. The token is expired.\"}",
      "source": "https://XYZ.sharepoint.com/sites/Consulting ...",
      "errors": []
    }

     

    For me this looks like a authentication problem with Office365 2FA. I think the JWT token expires every 14 days or so and require re-authentication.

  • Community Power Platform Member Profile Picture
    on at

    Any workaround for this issue? this is beining happening again on all O365 Flow connections.

  • v-micsh-msft Profile Picture
    on at

    Hi @Anonymous,

     

    Apologize for the late response.

    For the connections, is it available for you to update the Connection information through Microsoft Flow gear button->Connections to update the authentication information for the problematic connection?

    76.PNG

    Please check the Update Connection part in the following article:

    https://flow.microsoft.com/en-us/documentation/add-manage-connections/

     

    In addition, I will forward this and if there is any helpful information on this, I will post back.

    Regards

  • Community Power Platform Member Profile Picture
    on at

    Yes and that is what I've been doing. every now and then the token expiers, so the Flow stops and I should update the connection. Here is the error message for O365 services (Outlook, CRM, ...).

     

    "Failed to refresh access token for service: office365certificate. Correlation Id=83ad79e3-f50c-4766-aaaa-770f0e0f1b81, UTC TimeStamp = 2/5/2017 5:35:06 AM, Error: Failed to acquire token from AAD: AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '00000002-0000-0ff1-ce00-000000000000'. Trace ID: ac065f8c-8d54-402c-a20f-952fb4618aaf Correlation ID: c907c75f-e1a3-4069-9e12-f6afae6745f4 Timestamp: 2017-02-05 05:35:04Z "

  • ADiBi Profile Picture
    4 on at

    Same probleme here. Happens after 2FA-expiry.

    This is very annoying, because one doesn't get a notification about a broken connection.

     

    Best solution would be to circumvent 2FA after a successfull connection....

  • Mycosoft Profile Picture
    36 on at

    I am getting similar failures. I am running around 8 flows that use the same sharepoint connection and randomly some are succeding and some are failing with the get items: error_description":"Invalid JWT token. The token is expired.

  • daminsky Profile Picture
    16 on at

    Have you tried creating an App password for the Flow?

  • Community Power Platform Member Profile Picture
    on at

    Yes, it doesn't let me to login using app password. Auth happens through MS SSO and it doesn't allow app passwords.

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard