Troubleshoot UI flow invalid credentials error using AAD account

Applies to: Power Automate

Symptom


A flow that ran using an AAD account fails with the "InvalidConnectionCredentials" or "WindowsIdentityIncorrect" error codes.

InvalidConnectionCredentials Error

Windows Identity Incorrect error message

Cause


There are many reasons you may get this error when using an AAD account:

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

Solution


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

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

Device state in command prompt when running dsregcmd /status

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

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

Second, identify the AAD 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> Azure AD".  The account by which it says it's connected can be used in the connection.

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

  1.  Click on the "Info" button when selecting your Azure AD connection in the "Access work or school" screen. 
  2. This will open a screen which describes your connection info and device sync status.  There will be a button "Sync" at the end of this -- click this button, and wait for this process to complete.

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

  1. Try to log into the machine using the AAD 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 match the account on your computer.