|
| 1 | +--- |
| 2 | +title: Unattended Desktop Flow Run Fails with MSEntraMachineAlwaysPromptingForPassword |
| 3 | +description: Solves an error that occurs when you run an unattended desktop flow in Microsoft Power Automate for desktop. |
| 4 | +ms.author: moelaabo |
| 5 | +ms.reviewer: guco, alarnaud |
| 6 | +ms.custom: sap:Desktop flows\Unattended flow runtime errors |
| 7 | +ms.date: 12/09/2024 |
| 8 | +--- |
| 9 | +# An unattended desktop flow run fails with the MSEntraMachineAlwaysPromptingForPassword error |
| 10 | + |
| 11 | +This article provides a resolution for an error that occurs when you run an unattended desktop flow in Microsoft Power Automate for desktop. |
| 12 | + |
| 13 | +## Symptoms |
| 14 | + |
| 15 | +Your unattended desktop flow run fails with the "MSEntraMachineAlwaysPromptingForPassword" error code (formerly "AADMachineAlwaysPromptingForPassword"). |
| 16 | + |
| 17 | +```jsonc |
| 18 | +{ |
| 19 | + "error":{ |
| 20 | + "code": "MSEntraMachineAlwaysPromptingForPassword", |
| 21 | + "message": "Could not create unattended session with these credentials." |
| 22 | + } |
| 23 | +} |
| 24 | +``` |
| 25 | + |
| 26 | +:::image type="content" source="media/msentramachinealwayspromptingforpassword-error/msentramachinealwayspromptingforpassword.png" alt-text="Screenshot of the error code shown in the Body section of the Run a flow built with Power Automate for desktop page."::: |
| 27 | + |
| 28 | +## Cause |
| 29 | + |
| 30 | +Power Automate for desktop can't validate your Microsoft Entra ID (formerly Azure Active Directory) credentials on the machine. This issue is typically caused by a group policy setting on your machine. |
| 31 | + |
| 32 | +## Resolution |
| 33 | + |
| 34 | +To solve this issue, check the group policy setting on your machine. |
| 35 | + |
| 36 | +1. Press the Windows key+<kbd>R</kbd> to open the **Run** dialog. |
| 37 | +1. Type **gpedit.msc** and press <kbd>Enter</kbd> to open the Local Group Policy Editor. |
| 38 | +1. Navigate to **Computer Configuration** > **Administrative Templates** > **Windows Components** > **Remote Desktop Services** > **Remote Desktop Session Host** > **Security**. |
| 39 | +1. Look for the **Always prompt for password upon connection** setting. |
| 40 | + |
| 41 | + - If the setting is enabled, work with your IT department to disable the policy for that machine. |
| 42 | + |
| 43 | + > [!NOTE] |
| 44 | + > This value is also reflected in the registry at **Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services**. If the **fPromptForPassword** DWORD value for the **Terminal Services** key is set to **1**, the setting is enabled, and you need to work with your IT department to disable it (simply changing the registry value is generally not sufficient, as it might be reverted.) |
| 45 | +
|
| 46 | + - If the **Always prompt for password upon connection** setting isn't enabled but you receive the error code, type **regedit** in the **Run** dialog to open the Registry Editor. In the Registry Editor, navigate to the **Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp** registry key. Then, look for the **fPromptForPassword** DWORD and set it to **0**. If the DWORD doesn't exist, create it and set its value to **0**. |
0 commit comments