Desktop flow invalid credentials error when you use a Microsoft Entra account
This article provides a resolution for the InvalidConnectionCredentials
or WindowsIdentityIncorrect
error code that occurs when you run a desktop flow using a Microsoft Entra account.
Applies to: Power Automate
Original KB number: 4555623
Symptoms
When you run a desktop flow using a Microsoft Entra account, it fails with the InvalidConnectionCredentials
or WindowsIdentityIncorrect
error code.
{
"error":{
"code": "InvalidConnectionCredentials",
"message": "Could not connect to the Power Automate UI flows Agent. Please make sure that the UI flows connection credentials are valid."
}
}
{
"error":{
"code": "WindowsIdentityIncorrect",
"message": "The credentials provided with the request are invalid."
}
}
Cause
You might encounter the error when using a Microsoft Entra account for several reasons:
- 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.
Resolution
Ensure that the device is Microsoft Entra joined or domain-joined:
Open a command prompt.
Run the
dsregcmd /status
command.Check the
Device State
section.Make sure that one of the
DomainJoined
orAzureAdJoined
values isYES
.If this isn't the case, a Microsoft Entra account can't be used unless the device is joined. For more information, see How to join a device.
Identify the Microsoft Entra account to use in the machine configuration:
Open Settings and select Accounts.
Select Access work or school.
Make sure you see text like "Connected to <your_organization> Microsoft Entra ID." The account it's connected to can be used in the connection.
Synchronize the Microsoft Entra account on the device:
Select the Info button when selecting your Microsoft Entra connection on the Access work or school page.
This will open a page that describes your connection information and device synchronization status. Select the Sync button at the end of the page, and wait for this process to complete.
Verify that the configured Microsoft Entra account can sign in to the device:
- Try to sign in to the machine using the Microsoft Entra account identified in step 2.
- The device login must be successful in order to be used in a connection.
Make sure the flow is configured properly with the right username and password. This must match the account on your computer.