|
1 | 1 | --- |
2 | | -title: Error "Expression couldn't be evaluated" while using encrypted text |
3 | | -description: Provides a resolution for the error 'Expression couldn't be evaluated', when using direct encrypted text in Power Automate for desktop. |
4 | | -ms.reviewer: yiannismavridis |
5 | | -ms.date: 02/05/2025 |
| 2 | +title: Expression Couldn't be Evaluated Error When Using Encrypted Text |
| 3 | +description: Provides a resolution for the Expression couldn't be evaluated error when using direct encrypted text in Power Automate for desktop. |
| 4 | +ms.reviewer: iomavrid |
| 5 | +author: yiannismavridis |
| 6 | +ms.author: iomavrid |
| 7 | +ms.date: 02/08/2025 |
6 | 8 | ms.custom: sap:Desktop flows\Power Automate for desktop errors |
7 | 9 | --- |
8 | | -# Error "Expression couldn't be evaluated" while using encrypted text |
| 10 | +# "Expression couldn't be evaluated" error when using encrypted text |
9 | 11 |
|
10 | | -This article provides a resolution to the error 'Expression couldn't be evaluated', when using direct encrypted text in Power Automate for desktop. |
| 12 | +This article provides a resolution to the "Expression couldn't be evaluated" error that occurs when you use direct encrypted text in Power Automate for desktop. |
11 | 13 |
|
12 | 14 | _Applies to:_ Power Automate |
13 | 15 |
|
14 | 16 | ## Symptoms |
15 | 17 |
|
16 | | -* Running a flow results in the error message "Failed with error: Expression couldn't be evaluated" when running in a different machine. |
17 | | -* The desktop flow uses an action that has direct password input or direct encrypted text input. |
| 18 | +When you run a desktop flow on a different machine, you receive the following error message: |
18 | 19 |
|
19 | | -## Cause |
| 20 | +> Failed with error: Expression couldn't be evaluated |
| 21 | +
|
| 22 | +This issue occurs when the desktop flow includes an action that uses a direct input option. For example, |
20 | 23 |
|
21 | | -The direct input is encrypted using the local machine's DPAPI. This means that the input is not able to be decrypted when running the flow in a different machine. |
| 24 | +- The **Direct password input** option: |
22 | 25 |
|
23 | | -This scenario is documented when placing the cursor over the info icon if any of the direct input options is selected: |
| 26 | + :::image type="content" source="media/error-expression-could-not-be-evaluated/direct-password-input.png" alt-text="Screenshot that shows the Direct password input option in a desktop flow action."::: |
24 | 27 |
|
25 | | -:::image type="content" source="media/error-expression-could-not-be-evaluated/encrypted-tooltip.png" alt-text="Tooltip of encrypted text input."::: |
| 28 | +- The **Direct encrypted text input** option: |
26 | 29 |
|
27 | | -Example of direct password input option: |
| 30 | + :::image type="content" source="media/error-expression-could-not-be-evaluated/direct-encrypted-text-input.png" alt-text="Screenshot that shows the Direct encrypted text input option in a desktop flow action."::: |
| 31 | + |
| 32 | +## Cause |
28 | 33 |
|
29 | | -:::image type="content" source="media/error-expression-could-not-be-evaluated/direct-password-input.png" alt-text="Direct password input option."::: |
| 34 | +The error occurs because the direct input is encrypted using the local machine's [Data Protection API (DPAPI)](/dotnet/standard/security/how-to-use-data-protection). This means the input can't be decrypted when the flow is run on another machine. |
30 | 35 |
|
31 | | -Example of direct encrypted text input option: |
| 36 | +This limitation is highlighted when you hover over the info icon if any of the direct input options is selected. |
32 | 37 |
|
33 | | -:::image type="content" source="media/error-expression-could-not-be-evaluated/direct-encrypted-text-input.png" alt-text="Direct encrypted text input option."::: |
| 38 | +:::image type="content" source="media/error-expression-could-not-be-evaluated/encrypted-tooltip.png" alt-text="Screenshot that shows the tooltip that provides additional information about the limitations of using direct encrypted text or password input."::: |
34 | 39 |
|
35 | 40 | ## Resolution |
36 | 41 |
|
37 | | -To run the flow in a different machine, modify the flow to use sensitive variables. |
| 42 | +To run the flow on a different machine, modify the flow to use [sensitive variables](/power-automate/desktop-flows/manage-variables#sensitive-variables/power-automate/desktop-flows/manage-variables#sensitive-variables). |
| 43 | + |
| 44 | +1. Open the desktop flow in Power Automate for desktop. |
| 45 | +1. Locate the action that uses direct password input or direct encrypted text input. |
| 46 | +1. Replace the direct input with a sensitive variable: |
| 47 | + 1. Select the **Password input as variable** or **Input as text, variable or expression** option to use a variable as a password input or text input. |
| 48 | + 1. Choose a variable that's marked as sensitive. |
| 49 | +1. Save the modified flow and test it on a different machine to ensure that the error is resolved. |
| 50 | + |
| 51 | +## More information |
| 52 | + |
| 53 | +[Use passwords in certain actions within desktop workflows](/power-automate/desktop-flows/how-to/use-passwords) |
0 commit comments