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 / Cloud Flow to Trigger ...
Power Automate
Answered

Cloud Flow to Trigger Desktop Flow on Windows 365 When Disconnected

(0) ShareShare
ReportReport
Posted on by 4

Hello,

I am trying to run a Desktop flow set up on a Windows 365 virtual PC instance (I'll call the VM itself "W365" in this post) with a Machine connection setup.

 

First, I'll say what DOES work.  When I have the W365 connected via a remote desktop window, the whole thing works great. The cloud flow triggers the desktop flow, and in my remote desktop window, I can see the UI start to automate.  Everything works great.  In this scenario, I'd be running the "Attended" option.

 

The problem I'm having is that my whole goal was to schedule a recurring run at 1 AM every day, so I will not be directly connected to my W365 instance when it runs.  My laptop will be turned off.  I assumed this would need to be "Unattended."

 

When I set this up, and the cloud flow runs at 1 AM (or whenever I'm manually testing without the Remote Desktop connected), the flow will fail to say, "There is a user session on the target machine" (while this is running in "Unattended" mode).  

 

That made sense to me if the W365 instance behaved in a way where maybe it was "on" even though I wasn't connected.  I'm not that sure about how Windows 365 VMs are configured.  The thing that baffles me is that I then tried to run in "Attended" mode (again without the remote desktop connected), and I then got the complete opposite failure that says, "No unlocked user sessions found on the target machine.". 

 

To test this further, I even created a "Try / Catch" setup where it would just try both Unattended and Attended immediately in sequence, thinking maybe I'd "wake up" a session or something strange.  Doing this, I get both completely contradicting errors in a row.  In the same flow, it has two errors.  One says, "There's a user session..." The next action immediately gets "No unlocked user sessions found...".

Screenshot 2023-01-08 223017.jpg

 

Any help would be greatly appreciated!!

 

I have the same question (0)
  • Verified answer
    Unknown geen idee Profile Picture
    1,757 on at

    Dear S_Tran_335,

     

    I am not entirely an expert, but I do work in a similar setup like you do. There are 2 things which come to mind:

    • Are you signed out of the VM when you try to run unattended? I have seen the error "There is a user session on the target machine" just to realize that I was still signed on on the VM. So ensure you are signed out, but the VM is still running.
    • Do you have an unattended RPA license enabled? The documentation on this is somewhat hidden (at least that is my experience). When I manage to enable this license I am able to run unattended RPA's on VM without issue https://learn.microsoft.com/en-us/power-platform/admin/power-automate-licensing/add-ons(Well, not entirely without issues ... I still have a problem with MFA (Multi-Factor Authentication) on the VM, but that is a seperate issue).

    Happy flowing,

    Koen

  • S_Tran_335 Profile Picture
    4 on at

    That was it!  

     

    For the Windows 365 Instance, i was just disconnecting my Remote Desktop.  Per your suggestion, it worked for "Unattended" once I made sure to Sign Out of the windows account on the VM rather than just disconnecting my Remote Desktop.

     

    Thank you so much!

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 796

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 538

Last 30 days Overall leaderboard