Service Account vs. Service Principal in Power Automate
Service account or service principal for production Power Automate flows: a decision guide based on Microsoft's documentation.
After a password change, Power Automate reports connection errors like 401 or ConnectionAuthorizationFailed. Here's how to fix it step by step.
After a password change, a Power Automate flow often keeps running as usual until it suddenly stops with a red error message. The reason is almost always the same: the affected connection was created with the old password, and its stored OAuth token is rejected as invalid on the next run attempt. This affects not only you, but anyone using a flow with a shared connection that points to your account.
The good news: in most cases, the error can be fixed within minutes without rebuilding the flow. This article shows you how to recognize the problem, how to find and repair the affected connection, and how to better protect yourself before the next password change. As of: July 2026.
Every connection in Power Automate stores an OAuth refresh token in the background, which the flow uses to re-authenticate on every run. If you change your password, Microsoft Entra ID retroactively invalidates all tokens that were valid at that time, according to the official documentation on Troubleshooting broken connections. The specific error message reads roughly: "The granted permission token has expired due to revocation, so a new authentication token is needed. The user may have changed or reset their password." This message appears regardless of whether you changed the password yourself or it was reset because it had expired.
Important to know: this is not a bug or an exception, but expected behavior. Every password change automatically invalidates every existing connection that was created with the old password, individually for each connector.
An expired token usually shows up in the flow as HTTP error 401 (Unauthorized) or as the error code ConnectionAuthorizationFailed. According to the Error code reference for cloud flows, this code means: the connection itself still exists, but its stored credentials are no longer valid, for example because the password was changed or an MFA method was reset.
The fix works the same way for most connectors, whether it's SharePoint, Outlook, Teams, or another standard connector:
These steps are also described in the official guide Fix connection failures in cloud flows in the section on connection health checks. If the flow uses a shared connection owned by someone else, you can't fix it yourself: either that person needs to re-authenticate the connection, or you create your own connection and assign it to the action in the flow.
Sometimes the error persists even with a new password. There are several documented reasons for this, which you can rule out one by one:
These causes are listed in detail in the documentation on connection health checks in Fix connection failures in cloud flows. If the error persists after fixing it, it's also worth checking the Microsoft Entra sign-in logs to rule out blocks caused by conditional access policies.
For individual, personally used flows, the problem can't be fully avoided, since every connection depends on the password of the respective account. For production flows that run as a team or unattended, the documentation therefore recommends switching to service principal connections where possible: these don't expire when a person changes their password or leaves the company. In addition, a fixed calendar reminder helps to renew the stored credentials for service accounts in time before they expire automatically. Anyone who wants to run their Power Automate flows in production with clean error handling can get support from NordFlux's Power Automate services.
Because the connection's stored OAuth token was tied to your old password. Microsoft Entra ID automatically invalidates all previously issued tokens for that account with every password change, regardless of whether you modified the flow yourself.
No. In most cases, it's enough to re-authenticate the affected connection under Power Automate > Connections via Fix connection. The flow itself remains unchanged.
It means the connection itself still exists, but its stored credentials are no longer valid, for example due to a password change, a reset MFA method, or revoked app access.
This happens with shared connections owned by someone else. In this case, either that person needs to re-authenticate the connection, or you create your own connection and assign it to the affected action in the flow.
The most reliable way is to use service principal connections, since they don't rely on the OAuth token of an individual user account and therefore don't automatically expire when someone changes their password.
Founder of NordFlux. Spent four years automating processes at enterprise scale at Dräger, and now brings that depth to the mid-market — pragmatic and with full data sovereignty.
Certifications
Service account or service principal for production Power Automate flows: a decision guide based on Microsoft's documentation.
Power Automate flow no longer running? Trigger conditions, connections, 90-day rule, license and DLP at a glance.
When the flow owner leaves the company, automations grind to a halt: connections expire, accounts get deleted. An overview of rescue and prevention.
A 401 error after your next password change is not an exception, it is a structural problem when flows are tied to personal logins instead of service accounts. NordFlux takes over ongoing operations for your Power Automate flows, including monitoring, so expired connections get flagged before a process stands still for days. In the first conversation we look at how your critical flows are secured today.