Troubleshoot desktop flow invalid credentials error using Microsoft Entra account

This article provides a resolution to troubleshoot the errors of InvalidConnectionCredentials or WindowsIdentityIncorrect when running your UI flow.

Applies to:   Power Automate
Original KB number:   4555623


A flow that ran using a Microsoft Entra account fails with the InvalidConnectionCredentials or WindowsIdentityIncorrect error codes.

Screenshot of the InvalidConnectionCredentials error code.

Screenshot of the WindowsIdentityIncorrect error code.


There are many reasons you might get this error when using a Microsoft Entra account:

  • The account credentials entered into the connection might not match those on the machine.
  • The device might not be Microsoft Entra joined (or Microsoft Entra hybrid joined) to support Microsoft Entra authentication.
  • The Microsoft Entra account might not be synchronized to the machine.


First, ensure that the device is Microsoft Entra joined or domain-joined:

  1. Open a command prompt.
  2. Run the command dsregcmd /status.
  3. Check the Device State section.

Screenshot of the device state in the command prompt when running dsregcmd /status.

Make sure that one of the DomainJoined or AzureAdJoined values is YES.

If it isn't the case, a Microsoft Entra account can't be used unless the device is joined, see the Microsoft documentation on How to join a device.

Second, identify the Microsoft Entra account to use in the machine configuration:

  1. Open Settings and select Accounts.
  2. Select Access work or school.
  3. Make sure you see text that says something like, Connected to <your_organization> Microsoft Entra ID. The account by which it says it's connected can be used in the connection.

Third, synchronize the Microsoft Entra account on the device. To do this:

  1. Select the Info button when selecting your Microsoft Entra connection in the Access work or school screen.
  2. This will open a screen that describes your connection info and device sync status. There will be a button Sync at the end of this, select this button, and wait for this process to complete.

Fourth, check that the configured Microsoft Entra account can log into the device:

  1. Try to sign in to the machine using the Microsoft Entra account identified in the step above.
  2. The device login must be successful in order to be used in a connection.

Lastly, make sure the flow is configured properly with the right username and password. This much matches the account on your computer.