web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Desktop Flow (attended...
Power Automate
Answered

Desktop Flow (attended) failing when rdp connnection is closed

(0) ShareShare
ReportReport
Posted on by 35

Hello,
I developed an automation with Power Automate desktop that runs on Azure VM which I connect through RDP. I built the automation there and then I used a recurring cloud flow to call my desktop automation.

 

If I have the RDP session open, then the Desktop Flow runs perfectly fine in attended mode. However, if I close the RDP session (without signing out the user), then it throws me an error when executing it stating:

"No machine able to run the desktop flow has been found. Aborting execution. Error encountered when connecting to machines: No unlocked user sessions found on the target machine. Cannot execute attended desktop flow."

 

It seems that for whatever reason the RDP is forcing the VM to lock, although I can see from the VM it is not signed out.

Is this any limitation from PAD that requires always unattended in RDP connections, or is it some misconfiguration on the VM that is locking the user session when I close the RDP?

 

Thank you!

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you close an RDP connection, it will close the session, too. Also, if you are logged in to the VM via RDP, but minimize the session, the screen will turn "black" and PAD will not be able to see UI elements, so that won't work, either.

    Technically, if you want your flows to run on a VM without you being signed in, this is unattended automation and you do need to run it in unattended mode. That's exactly what the unattended mode is all about.

    Alternatively, you could login to the VM via a different type of remote access software, such as TeamViewer, AnyDesk or similar. When you close the session via these tools, the account is not logged out of and the machine is not locked, so attended flows can still run. The session would still get auto-locked after some user inactivity, based on your Windows settings. Changing settings to prevent the machine from locking would be a serious security issue, though, so it is not recommended. The right approach is still to either be logged in when you want an attended flow, or use unattended flows.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • rmts Profile Picture
    35 on at

    Thank you @Agnius ,

     

    Makes complete sense what you just told me. I tried with TeamViewer and mRemoteNG but it still fails after I close the client applications, so I guess most likely there isn't any workaround, would just need to get the unattended license.

    Was just trying to see if I could get a workaround in the meanwhile until we get the procurement finalized at my company.

    Thank you for the help provided though!

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I have had flows running in attended mode on VMs that I connect to via TeamViewer/AnyDesk, so it definitely is possible. You just need to make sure you adjust the system settings on the machine to no lock/sleep after inactivity. Also, make sure that the remote access software that you use does not force the machine to lock after the session ends. That's usually a toggle in the settings of the software.

     

    But the correct approach is getting the unattended license anyway.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 275 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 178 Super User 2026 Season 2

Last 30 days Overall leaderboard