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 / Unattended bot - Error...
Power Automate
Answered

Unattended bot - Error (There is a user session on the target machine).

(0) ShareShare
ReportReport
Posted on by 55

Hi everyone, 

 

Imagine the following scenario. 

 

1. I have a Windows Server where I have installed the Machine runtime app.

2. I set up the machine using a service account on the server. I will call it serviceaccount@contoso.com

3. I have a per-user plan premium license + the RPA add-on attached to the serviceaccount@contoso.com

4. After having my service account set up, I created my flow in the cloud, and selected the Unattended mode (I was logged in in the cloud using the same serviceaccount@contoso.com); however, I got the error below: 

 

"No machine able to run the desktop flow has been found. Aborting execution. Error encountered when connecting to machines: There is a user session on the target machine. Cannot execute unattended desktop flow."

 

Then, I went back to the server, and I set up a new machine using my own credentials. For reference I will call it pmota@contoso.com  and the previous flow worked in the cloud. 

 

However, I do not have premium account. It does not make sense to me having two premium accounts to run an unattended flow. What am I doing wrong? I double-checked and ensured I had all the sessions logged-out in the server.

 

Any help will be much appreciated.  

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you want to run it in unattended mode, the user must not be logged in to the account when you run the flow. If it is a normal Windows machine, no user sessions can be active. If it is a Windows Server machine that supports parallel user sessions, the specific user that you use for launching the desktop flow (as set up in the Desktop flows connection in the cloud) must be logged off.

     

    That's the general idea of an unattended flow - it cannot take over an active user session, nor can it terminate it. The user must be signed out when the unattended flow is to run. If you want to run it while the user is signed in, you should run it in attended mode.

    -------------------------------------------------------------------------
    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.

  • Verified answer
    pmota Profile Picture
    55 on at

    Hi @Agnius , 

     

    Thank you for your response. 


    After so much struggle, I figured out what the issue was. When creating the machine, the toggle to reuse sessions needs to be turned on.  

    pmota_0-1695933850114.png

    By doing this, the secondary account was not necessary (Which makes more sense). 

     

    More information can be found on the link below:

    https://learn.microsoft.com/en-us/power-automate/desktop-flows/run-unattended-desktop-flows

     

    Thank you,

     

    Paulo

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 1,005

#2
Valantis Profile Picture

Valantis 825

#3
Haque Profile Picture

Haque 619

Last 30 days Overall leaderboard