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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unattended Flow can't ...
Power Automate
Unanswered

Unattended Flow can't establish session on Virtual Machine

(0) ShareShare
ReportReport
Posted on by 131

Greetings and Compliments for the New Year

 

I posted this at the end of another thread, but thought it best to have a single issue in a thread that makes sense.

 

I have a flow that runs great when I run it manually or on Task Scheduler.

 

I'm now trying to run it unattended, which I can't seem to get it to run.

If I sign out of the virtual machine or just restart it so that it is new I get

"Cannot create new session to execute unattended run."

 

If I just disconnect, leaving the user connected I get

"Cannot create new session to execute unattended run."

 

I do have an Unattended license on the user account in question.

The Cloud flow, to trigger the virtual machine desktop flow, is the same user with unattended license.

 

I have scheduled on the cloud flow for every 2 minutes.

 

I have gone through all the posts I could find around this issue,

and there is no real solution that I work use to solve this.

 

Any Assistance will be greatly appreciated.

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

    Have you tried signing out, without rebooting the machine?

    Are all Power Automate services running fine on the machine?

    Have you registered the machine runtime app to the environment? Have you tried running the troubleshooter on the app?

  • CraigSparks37 Profile Picture
    131 on at

    Hi @Agnius 

     

    To answer your questions.

    Have you tried signing out, without rebooting the machine? Yes. Restart, connect and then sign out. also Just restart.

    Are all Power Automate services running fine on the machine? Yes.

    Have you registered the machine runtime app to the environment? Yes

    Have you tried running the troubleshooter on the app? No, the error is in the cloud flow trying to connect to the desktop flow on the Virtual Machine.

     

    There must be something small that I am missing..

     

    NOTE:::::

    I made a mistake in my initial post here:

    If I just disconnect, leaving the user connected I get

    "There is a user session on the target machine. Cannot execute unattended desktop flow."

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Is the user allowed to connect to the machine via Remote Desktop Protocol? That's what PA uses to create unattended sessions.

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

  • CraigSparks37 Profile Picture
    131 on at
    Yes, I tested Remoting to the machine with the credentials in the Cloud connection and I was able to connect with no issues.
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I am out of ideas. Maybe try reporting this as a bug to MS support and have them look into it. As a paying customer, you should get priority support.

     

  • Verified answer
    CraigSparks37 Profile Picture
    131 on at

    Finally, a SORT OF Solution.

     

    The way that Power Automate Cloud RDP Unattended was trying to connect to the VM was perfect.

    After lots of investigation and pain, we found that the VM Client, in our case Citrix, was allowing the connection and then immediately terminating it.

     

    We provisioned a Microsoft 2022 VM, placed it behind firewalls, opened the required in and outs, and it is able to establish the Unattended RDP, and run the Flow. 

     

    So the underlying issue in my case was the Citrix Client killing the connection.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard