Skip to content

Commit dab134f

Browse files
committed
Edit and cleanup
1 parent 678ebd3 commit dab134f

1 file changed

Lines changed: 26 additions & 22 deletions

File tree

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

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Desktop flow invalid credentials error when using a Microsoft Entra account
33
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
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
---
@@ -34,18 +34,20 @@ When you run a desktop flow using a Microsoft Entra account, it fails with the `
3434
}
3535
```
3636

37-
In these error codes, you might also experience an error message containing the phrase `AADSTS50126: Error validating credentials due to invalid username or password`.
37+
You might also receive the following error message:
38+
39+
> AADSTS50126: Error validating credentials due to invalid username or password
3840
3941
## Cause
4042

4143
You might encounter the error when using a Microsoft Entra account for several reasons:
4244

43-
- The account credentials entered into the connection might not match those on the machine.
44-
- 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).
45-
- The Microsoft Entra account might not be synchronized to the machine.
46-
- The user account being attempted to connect is a federated user (ADFS) while the tenant is configured to run on Microsoft Entra ID.
45+
- You enter account credentials into the connection that don't match the credentials on the machine.
46+
- 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).
47+
- The Microsoft Entra account isn't synchronized to the machine.
48+
- 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.
4749

48-
## Resolution
50+
## Solution
4951

5052
1. Ensure that the device is Microsoft Entra joined or domain-joined:
5153

@@ -57,38 +59,40 @@ You might encounter the error when using a Microsoft Entra account for several r
5759

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

60-
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).
62+
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).
6163

62-
2. Identify the Microsoft Entra account to use in the machine configuration:
64+
1. Identify the Microsoft Entra account to use in the machine configuration:
6365

6466
1. Open **Settings** and select **Accounts**.
6567

66-
2. Select **Access work or school**.
68+
1. Select **Access work or school**.
6769

68-
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.
70+
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.
6971

70-
3. Synchronize the Microsoft Entra account on the device:
72+
1. Synchronize the Microsoft Entra account on the device:
7173

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

74-
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.
76+
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.
77+
78+
1. Verify that the configured Microsoft Entra account can sign in to the device:
7579

76-
4. Verify that the configured Microsoft Entra account can sign in to the device:
80+
1. Try to sign in to the machine by using the Microsoft Entra account you identified in step 2.
81+
1. The device authentication must be successful to use the account in a connection.
7782

78-
1. Try to sign in to the machine using the Microsoft Entra account identified in step 2.
79-
2. The device login must be successful in order to be used in a connection.
83+
1. Make sure the flow is configured properly with the right username and password. This information must match the account on your computer.
8084

81-
5. Make sure the flow is configured properly with the right username and password. This must match the account on your computer.
85+
### AADSTS50126 error
8286

83-
### Specifically for AADSTS50126 case
87+
The preferred and most secure method to resolve this error is to configure [Certificate-Based Authentication (CBA)](/power-automate/desktop-flows/configure-certificate-based-auth).
8488

85-
The preferred and most secure method is to configure [Certificate-Based Authentication](/power-automate/desktop-flows/configure-certificate-based-auth).
89+
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 Sync (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 (HRD) policy that explicitly allows cloud password validation.
8690

87-
Alternatively, in cases where CBA cannot be configured, the alternative is for configurations where administrators of the on-premises IdP have configured Password Hash Sync (PHS) and password hashes are synchronized to the Cloud, federated users can use their password directly against Microsoft Entra ID (ESTS). In order to do that, a Home Realm Discovery (HRD) policy should be configured to explicitly allow this.
91+
To enable this configuration, set the following HRD policy value:
8892

89-
For more information on this case, please follow this article: [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)
93+
`"AllowCloudPasswordValidation": true`
9094

91-
The setting that needs to be used is `"AllowCloudPasswordValidation" : true`
95+
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).
9296

9397
## More information
9498

0 commit comments

Comments
 (0)