This error usually means the OneDrive connection is valid, but the user behind the connection cannot be resolved by OneDrive/Graph at runtime.
A few things to check:
Confirm you are using the correct connector:
Use OneDrive for Business for work/school accounts.
Do not use the personal OneDrive connector for a Microsoft 365 business account.
Check whether the account still has an active OneDrive provisioned.
Ask the user to open OneDrive in the browser manually.
If OneDrive does not open or shows a setup/provisioning issue, the flow will fail even if the connection says “Connected.”
Recreate the connection from inside the flow action.
Open the failed action.
Change the connection being used.
Select the newly created OneDrive for Business connection.
Save the flow and test again.
If this is running under a service account, make sure:
The service account has a valid Microsoft 365 license.
OneDrive is enabled for that account.
The account is not blocked, deleted, disabled, or converted to a shared mailbox.
Try replacing the action.
Delete the List files in root folder action.
Add it again using the new connection.
Save and retest.
If the issue still happens after recreating the action and connection, this may need Microsoft support because the error points to the backend not finding the user object, not just a simple permission issue.