Skip to content

Commit 46c3e07

Browse files
Update take-screenshot-action-fails-in-unattended-mode.md
1 parent bd3c9f7 commit 46c3e07

File tree

1 file changed

+9
-27
lines changed

1 file changed

+9
-27
lines changed

support/power-platform/power-automate/desktop-flows/take-screenshot-action-fails-in-unattended-mode.md

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Faile
3131
### Modes
3232
- Unattended
3333

34-
3534
## Detection
3635

3736
While using the **Take screenshot** action, the above error is thrown when a specific security policy is in place.
@@ -46,32 +45,15 @@ The security policy refers to the way a UAC window (for admin privileges) is pro
4645

4746
## Resolution 2: Change the registry key below
4847

49-
This resolution requires Power Automate for desktop version 2.49 or later. If you don't have MFA enabled for the account used by the desktop flows connection, you can set up Microsoft Entra authentication using a username and password instead.
50-
51-
1. Open the Registry Editor (regedit) with administrative privileges. Navigate to the following registry path, create a new DWORD-32 value with the name `UseRdsAadAuthentication`, and then set the value of `UseRdsAadAuthentication` to **1**.
52-
53-
|Registry path|Registry key| DWORD-32 value|
54-
|-------------|------------|---------------|
55-
|Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Power Automate Desktop\Service|`UseRdsAadAuthentication`|**1**|
56-
57-
2. [Hide the consent prompt dialog for a target device group](/power-automate/desktop-flows/run-unattended-desktop-flows#admin-consent-for-unattended-runs-using-cba-or-sign-in-credentials-with-nla-preview).
58-
59-
3. Restart the Power Automate service.
60-
61-
4. Use a Microsoft Entra ID connection with username and password credentials. Note that an MFA exception is required for this account.
62-
63-
## Resolution 3: Disable fPromptForPassword
64-
65-
To solve this issue, check the group policy setting on your machine.
66-
67-
1. Press the Windows key+<kbd>R</kbd> to open the **Run** dialog.
68-
1. Type **gpedit.msc** and press <kbd>Enter</kbd> to open the Local Group Policy Editor.
69-
1. Navigate to **Computer Configuration** > **Administrative Templates** > **Windows Components** > **Remote Desktop Services** > **Remote Desktop Session Host** > **Security**.
70-
1. Look for the **Always prompt for password upon connection** setting.
48+
Hive: **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System**
7149

72-
- If the setting is enabled, work with your IT department to disable the policy for that machine.
50+
Key: **ConsentPromptBehaviorAdmin** DWORD, setting it to 5
7351

74-
> [!NOTE]
75-
> 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.)
52+
Options:
7653

77-
- 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**.
54+
- **0** = Elevate without prompting
55+
- **1** = Prompt for credentials on the secure desktop
56+
- **2** = Prompt for consent on the secure desktop
57+
- **3** = Prompt for credentials
58+
- **4** = Prompt for consent
59+
- **5** = Prompt for consent for non-Windows binaries (default) <- Set option to this

0 commit comments

Comments
 (0)