Search code examples
sharepointpower-automate

Power Automate - 401 Unauthorized at Sharepoint Connector after it worked successfully


My company uses Office365 and I just setup a small power automate cloud workflow to set my Teams presence status:

enter image description here

The workflow this action is using worked fine yesterday, but today I get this error from sharepoint:

{
  "status": 401,
  "message": "clientRequestId: b963572e-dc3c-430d-81f5-c63dcf2b1089",
  "source": "https://presence.teams.microsoft.com/v1/me/forceavailability",
  "errors": []
}

As the HTTP PUT call worked, I assume the reason is an expired token issue or something similar. I signed out and in multiple times in "power automate". I also opened the "sharepoint app" in Office365 (whatever you're supposed to do with it) which worked fine.

The sharepoint connector in power automate also seems to be happy:

enter image description here

Any ideas how to get the sharepoint connection running again ?


Solution

  • I was able to get mine working again by selecting "Change Connection" in the SharePoint step (making the PUT to presence.teams.microsoft.com).

    I added my own account in a second time and saved and tested and it worked fine.

    1. Open the Flow
    2. Click the Update my Note step
    3. Click "Change Connection" at the bottom of the parameters window.

    Credit to where I originally found how to set a status message: https://damobird365.com/teams-status-update-via-power-automate/ (see comments).