You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/power-platform/power-automate/desktop-flows/troubleshoot-ui-flow-invalid-credentials-error-using-aad-account.md
+37-17Lines changed: 37 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
1
---
2
2
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.
# Desktop flow invalid credentials error when you use a Microsoft Entra account
9
9
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.
11
13
12
14
_Applies to:_ Power Automate
13
15
_Original KB number:_ 4555623
@@ -34,15 +36,20 @@ When you run a desktop flow using a Microsoft Entra account, it fails with the `
34
36
}
35
37
```
36
38
39
+
You might also receive the following error message:
40
+
41
+
> AADSTS50126: Error validating credentials due to invalid username or password
42
+
37
43
## Cause
38
44
39
45
You might encounter the error when using a Microsoft Entra account for several reasons:
40
46
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.
44
51
45
-
## Resolution
52
+
## Solution
46
53
47
54
1. Ensure that the device is Microsoft Entra joined or domain-joined:
48
55
@@ -54,31 +61,44 @@ You might encounter the error when using a Microsoft Entra account for several r
54
61
55
62
Make sure that one of the `DomainJoined` or `AzureAdJoined` values is `YES`.
56
63
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).
58
65
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:
60
67
61
68
1. Open **Settings** and select **Accounts**.
62
69
63
-
2. Select **Access work or school**.
70
+
1. Select **Access work or school**.
64
71
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.
66
73
67
-
3. Synchronize the Microsoft Entra account on the device:
74
+
1. Synchronize the Microsoft Entra account on the device:
68
75
69
76
1. Select the **Info** button when selecting your Microsoft Entra connection on the **Access work or school** page.
70
77
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.
72
92
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:
74
94
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`
77
96
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).
0 commit comments