What the error means
AttendedUserNotLoggedIn is a Power Automate desktop flow error for attended runs. Microsoft's queue errors article says it occurs when the user specified in the connection isn't signed in to the target machine. The error code table groups it with AttendedUserSessionNotActive and gives one instruction for both: check that you're logged in with the correct user and that the session is unlocked on the machine.
Attended and unattended runs need opposite machine states. An attended run uses the session of a person who is signed in and working at the machine, so Microsoft says attended desktop flows can only run if the machine is unlocked on a session whose current user matches the user in the desktop flow connection. If nobody is signed in, or a different Windows user is signed in, there is no matching session and the run cannot start.
The code is one of the common suberrors of NoCandidateMachine, so you may first see the run waiting in the queue and then failing. Its sibling AttendedUserSessionNotActive covers the case where the right user is signed in but the session is locked or disconnected.
Common causes
- Nobody is signed in on the target machine when the attended run starts.
- A different Windows user is signed in than the one in the desktop flow connection.
- The connection points to a different machine than the one where you are signed in.
- The Power Automate service account lacks Remote Desktop permissions, so it cannot see the user's session.
How to fix it
1. Sign in on the machine with the connection's user
Connect to the target machine with the user used for the attended run and leave the session active and unlocked while the flow runs. Then run the cloud flow again.
2. Check the credentials match the signed-in user
Check the credentials in your desktop flow connection and make sure they are the ones used in the unlocked session. Microsoft suggests verifying your identity on the machine with:
whoamiCompare the result with the username in the connection. Microsoft's error table lists the supported formats, such as domain\username for a domain account, username@domain for a Microsoft Entra account and .\username for a local account.
3. Make sure you target the right machine
Open the machine runtime application on the machine you are signed in to and select View machine in portal. Microsoft says this confirms it brings you to the machine your run targets. If it does not, update the connection or the cloud flow to use that machine.
4. Give the Power Automate service Remote Desktop permissions
For AttendedUserNotLoggedIn and AttendedUserSessionNotActive, Microsoft says to verify that the account running the Power Automate service (UIFlowService) has Remote Desktop permissions. By default it runs as NT SERVICE\UIFlowService. Open Local Users and Groups (Microsoft's article says to type usrmgr.msc in Start > Run; the Windows console file is lusrmgr.msc), select Groups, double-click Remote Desktop Users and check the account is included. If it is not, add it with administrator permissions and restart the machine.
If nothing works
If the flow should run without anyone at the machine, consider the unattended run mode instead (this is a general step); unattended runs need the user signed out, and the opposite error, SessionExistsForTheUserWhenUnattended, applies there. For more on the two run modes and their licences, see the guide to getting started with Power Automate desktop flows.
What we checked
Two Microsoft Learn articles were read. "Troubleshoot desktop flow run queue errors" defines AttendedUserNotLoggedIn and AttendedUserSessionNotActive, gives the sign-in, machine and whoami checks, and the UIFlowService Remote Desktop Users note. "Error code occurs when running an attended or unattended desktop flow" lists both codes for attended runs with the logged-in and unlocked check, and the supported username formats. The error was not reproduced for this page.
Last checked: 2026-11-21.