PL-500 · Question #141
You have an automation solution that uses a desktop flow. The flow reads data from a file that is stored on a UserA's machine and writes the data to an application. You import the solution to an…
The correct answer is B. Change the location of the file to a specific path that is not dependent on the signed-in user. When a desktop flow uses a hardcoded file path tied to a specific user profile, the path fails on a different user's machine because the username portion of the path does not match.
Question
You have an automation solution that uses a desktop flow. The flow reads data from a file that is stored on a UserA’s machine and writes the data to an application. You import the solution to an environment that is connected to UserB’s machine. UserB reports that the flow fails. An alert indicates that the path to a file does not exist. You confirm that the file present on the UserB’s desktop. You need to resolve the issue. What should UserB do?
Options
- AMove the file to the user's documents folder.
- BChange the location of the file to a specific path that is not dependent on the signed-in user.
- CModify the action to retry if the process cannot find the file.
- DChange access rights for the file to allow read operations for the PAD process.
How the community answered
(44 responses)- A2% (1)
- B80% (35)
- C11% (5)
- D7% (3)
Why each option
When a desktop flow uses a hardcoded file path tied to a specific user profile, the path fails on a different user's machine because the username portion of the path does not match.
Moving the file to the documents folder does not resolve the issue unless the hardcoded path in the flow action is also updated to point to the new location.
Changing the file location to a path that is not dependent on the signed-in user - such as a network share or a system-level directory - makes the path valid regardless of which user account runs the flow. This resolves the failure without requiring the file to be placed in any specific user profile folder.
Adding a retry modifier does not fix an invalid file path - the file will not be found on any retry attempt if the path itself is incorrect.
Read access rights are not the cause of the failure - the error indicates the path does not exist, not that access is denied.
Concept tested: Power Automate Desktop cross-user file path portability
Source: https://learn.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/file
Topics
Community Discussion
No community discussion yet for this question.