Power Automate actions often require authentication to access external services like SharePoint, Outlook, Dataverse, SQL Server, APIs, or third-party applications. When an authentication error occurs, the action fails with the following message:
“Action failed due to authentication error – Authentication error while trying to run the action.”
This error usually means that Power Automate cannot verify your identity or connect to the service due to expired credentials, invalid authentication tokens, permission issues, or misconfigured connections.
2. Common Causes of Authentication Errors
- Expired or Revoked Authentication Token – The authentication token for the connection has expired.
- Incorrect Credentials – The username, password, or API key used for authentication is incorrect.
- Insufficient Permissions – The account used does not have the necessary access rights.
- Multi-Factor Authentication (MFA) Issues – MFA requirements are blocking the authentication process.
- Disabled or Deleted User Account – The account linked to the connection has been disabled or deleted.
- Misconfigured Connection in Power Automate – The service connection is incorrectly configured.
- Service Outage or API Restrictions – The external service is experiencing downtime or has API limitations.
- IP Restrictions or Firewall Blocks – Security policies prevent Power Automate from connecting to the service.
3. Step-by-Step Troubleshooting Guide
Step 1: Identify the Failing Action
- Open Power Automate (https://flow.microsoft.com).
- Navigate to My Flows and select the affected flow.
- Click Run History and locate the failed run.
- Expand the failed action and review the error message.
- Look for messages like:
"401 Unauthorized"
(Invalid credentials)"403 Forbidden"
(Permission denied)"Connection not found"
(Deleted or misconfigured connection)
Solution:
- If the error is “401 Unauthorized”, reauthenticate the connection (see Step 2).
- If the error is “403 Forbidden”, check permissions (see Step 3).
- If the error mentions a missing or expired token, refresh the connection (see Step 4).
Step 2: Reauthenticate the Connection
If your credentials have expired or been revoked, you need to reauthenticate the connection.
Solution:
- Go to Power Automate > Data > Connections (Direct Link).
- Locate the service (e.g., SharePoint, Outlook, SQL Server).
- If the connection shows “Invalid” or “Needs reauthentication”, click Fix connection.
- Enter your credentials and authorize the connection again.
- Save the flow and test it again.
Example:
- If the Outlook 365 connection has expired, reenter your Microsoft credentials.
Step 3: Check User Permissions
If your account does not have the required permissions, authentication may fail.
Solution:
- For SharePoint: Ensure your account has at least “Contribute” access to the site.
- For SQL Server: Verify that your account has “Read” or “Write” permissions.
- For APIs: Check if your API key or OAuth token has the necessary scope for the action.
Example:
- If a SharePoint action fails with “403 Forbidden”, ask an administrator to grant you the correct permissions.
Step 4: Refresh or Recreate the Connection
If reauthentication fails, delete and recreate the connection.
Solution:
- Go to Power Automate > Data > Connections.
- Find the failing connection and delete it.
- Click + New Connection, select the service, and sign in again.
- Update your flow to use the new connection.
Example:
- If a SQL Server connection is failing, re-add the connection with the correct database credentials.
Step 5: Check Multi-Factor Authentication (MFA) Settings
If your organization enforces MFA (Multi-Factor Authentication), automated flows might fail when they attempt to log in.
Solution:
- Contact your IT admin to check if MFA is blocking the connection.
- Use a service account that does not require MFA.
- If the service supports OAuth tokens, use an App Registration in Azure to authenticate.
Example:
- If an Office 365 service requires MFA, switch to an App Registration with client credentials.
Step 6: Verify API Key or OAuth Token (For Custom APIs)
If your flow connects to an API using an API key or OAuth, the key may have expired.
Solution:
- Check the API documentation to see if your key has an expiration date.
- If using OAuth, generate a new access token.
- Replace the expired key or token in the flow.
Example:
- If calling a REST API, check the authentication header and ensure the token is valid.
Step 7: Check for Service Outages or Firewall Restrictions
If the external service is down or your network is blocking access, authentication may fail.
Solution:
- Visit the service’s status page (e.g., Microsoft 365 Status).
- Try logging into the service manually to confirm if it works.
- If the issue is network-related, contact your IT team to check firewall rules.
Example:
- If an SMTP action is failing, ensure the email server is not blocking Power Automate requests.
4. Preventative Measures
To avoid authentication errors in the future:
✔ Use long-term authentication methods (e.g., App Registrations, Service Accounts).
✔ Monitor Power Automate connections regularly and renew expiring tokens in advance.
✔ Check permissions before setting up a flow to prevent authorization issues.
✔ Use error handling in Power Automate to catch authentication failures and retry.
✔ Enable alerts for connection failures to detect issues early.