Skip to content

Commit 1ee9850

Browse files
authored
Merge pull request #10375 from MicrosoftDocs/users/spanopoulos/pautomate/rdtokenacqfailure
AB#9051: Add guidance for AADSTS50126 errors in Desktop Flows AADLoginFailure (Ref#33180201)
2 parents 5abebb8 + 38e00dd commit 1ee9850

1 file changed

Lines changed: 37 additions & 17 deletions

File tree

support/power-platform/power-automate/desktop-flows/troubleshoot-ui-flow-invalid-credentials-error-using-aad-account.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
title: Desktop flow invalid credentials error when using a Microsoft Entra account
3-
description: Resolves the InvalidConnectionCredentials or WindowsIdentityIncorrect error that occurs when you run a desktop flow using a Microsoft Entra account.
4-
ms.reviewer: guco,aartigoyle
3+
description: Learn how to resolve InvalidConnectionCredentials, WindowsIdentityIncorrect, and AADSTS50126 errors in Power Automate desktop flows caused by Microsoft Entra account issues.
4+
ms.reviewer: guco,aartigoyle, v-shaywood
55
ms.date: 08/20/2024
66
ms.custom: sap:Desktop flows\Cannot create desktop flow connection
77
---
88
# Desktop flow invalid credentials error when you use a Microsoft Entra account
99

10-
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](/entra/fundamentals/whatis#terminology).
10+
This article provides resolutions for the `InvalidConnectionCredentials` or `WindowsIdentityIncorrect` errors that might occur when you run a desktop flow using a [Microsoft Entra account](/entra/fundamentals/whatis#terminology). These errors typically indicate issues with device join status, account synchronization, or credential mismatches between the desktop flow connection and the target machine.
11+
12+
This article also covers the `AADSTS50126` error, which occurs when credential validation fails because of an invalid username or password, particularly in scenarios involving federated users.
1113

1214
_Applies to:_   Power Automate
1315
_Original KB number:_   4555623
@@ -34,15 +36,20 @@ When you run a desktop flow using a Microsoft Entra account, it fails with the `
3436
}
3537
```
3638

39+
You might also receive the following error message:
40+
41+
> AADSTS50126: Error validating credentials due to invalid username or password
42+
3743
## Cause
3844

3945
You might encounter the error when using a Microsoft Entra account for several reasons:
4046

41-
- The account credentials entered into the connection might not match those on the machine.
42-
- The device might not be [Microsoft Entra joined](/entra/identity/devices/concept-directory-join) or [Microsoft Entra hybrid joined](/entra/identity/devices/concept-hybrid-join) to support [Microsoft Entra authentication](/entra/identity/authentication/overview-authentication).
43-
- The Microsoft Entra account might not be synchronized to the machine.
47+
- You enter account credentials into the connection that don't match the credentials on the machine.
48+
- The device isn't [Microsoft Entra joined](/entra/identity/devices/concept-directory-join) or [Microsoft Entra hybrid joined](/entra/identity/devices/concept-hybrid-join) to support [Microsoft Entra authentication](/entra/identity/authentication/overview-authentication).
49+
- The Microsoft Entra account isn't synchronized to the machine.
50+
- The user account attempting to connect is a [federated user (ADFS)](/windows-server/identity/ad-fs/ad-fs-overview) while the tenant is configured to run on Microsoft Entra ID.
4451

45-
## Resolution
52+
## Solution
4653

4754
1. Ensure that the device is Microsoft Entra joined or domain-joined:
4855

@@ -54,31 +61,44 @@ You might encounter the error when using a Microsoft Entra account for several r
5461

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

57-
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](/azure/active-directory/user-help/user-help-join-device-on-network#to-join-an-already-configured-windows-10-device).
64+
If this condition isn't true, you can't use a Microsoft Entra account unless the device is joined. For more information, see [How to join a device](/azure/active-directory/user-help/user-help-join-device-on-network#to-join-an-already-configured-windows-10-device).
5865

59-
2. Identify the Microsoft Entra account to use in the machine configuration:
66+
1. Identify the Microsoft Entra account to use in the machine configuration:
6067

6168
1. Open **Settings** and select **Accounts**.
6269

63-
2. Select **Access work or school**.
70+
1. Select **Access work or school**.
6471

65-
3. 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.
72+
1. 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.
6673

67-
3. Synchronize the Microsoft Entra account on the device:
74+
1. Synchronize the Microsoft Entra account on the device:
6875

6976
1. Select the **Info** button when selecting your Microsoft Entra connection on the **Access work or school** page.
7077

71-
2. 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.
78+
1. This action opens 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.
79+
80+
1. Verify that the configured Microsoft Entra account can sign in to the device:
81+
82+
1. Try to sign in to the machine by using the Microsoft Entra account you identified in step 2.
83+
1. The device authentication must be successful to use the account in a connection.
84+
85+
1. Make sure the flow is configured properly with the right username and password. This information must match the account on your computer.
86+
87+
### AADSTS50126 error
88+
89+
To resolve an AADSTS50126 error, the preferred and most secure method is to configure [Certificate-Based Authentication (CBA)](/power-automate/desktop-flows/configure-certificate-based-auth).
90+
91+
If you can't configure CBA, federated users can use an alternative approach when administrators of the on-premises Identity Provider (IdP) configure [password hash synchronization](/entra/identity/hybrid/connect/whatis-phs) (PHS) to synchronize password hashes to the cloud. In this scenario, federated users can authenticate directly against Microsoft Entra ID (ESTS) by configuring a [Home Realm Discovery](/entra/identity/enterprise-apps/home-realm-discovery-policy) (HRD) policy that explicitly allows cloud password validation.
7292

73-
4. Verify that the configured Microsoft Entra account can sign in to the device:
93+
To enable this configuration, set the following HRD policy value:
7494

75-
1. Try to sign in to the machine using the Microsoft Entra account identified in step 2.
76-
2. The device login must be successful in order to be used in a connection.
95+
`"AllowCloudPasswordValidation": true`
7796

78-
5. Make sure the flow is configured properly with the right username and password. This must match the account on your computer.
97+
For detailed instructions, see [Enable direct ROPC authentication of federated users for legacy applications](/entra/identity/enterprise-apps/home-realm-discovery-policy#enable-direct-ropc-authentication-of-federated-users-for-legacy-applications).
7998

8099
## More information
81100

82101
- [Create desktop flow connections](/power-automate/desktop-flows/desktop-flow-connections)
83102
- [Invalid credentials error when running desktop flows in Power Automate for desktop](invalid-credentials-errors-running-desktop-flows.md)
84103
- ["Logon type has not been granted" error when running a desktop flow or creating a connection](logon-type-has-not-been-granted.md)
104+
- [What is federation with Microsoft Entra ID?](/entra/identity/hybrid/connect/whatis-fed)

0 commit comments

Comments
 (0)