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 / Running unattended des...
Power Automate
Unanswered

Running unattended desktop flow on load balancing

(0) ShareShare
ReportReport
Posted on by 6

Hi.

I am helping a client with PAD and are having trouble getting the unattended desktop flow running consistently.  

The client has a server setup, where the user connects to a load balancing server (RD Gateway or RDS Broker), and then are redirected to 1 of 2 servers - the one with fewest users on. All server infrastructure is handle by another supplier. 
It seems like the flow only can get triggered when it hits the correct server by chance.

I have tried multiple solutions - none of them gets the flow running consistently:

  • Using the machine runtime and making a group with both. 
  • Using on-premise datagateways and making a cluster.
  • Making a flow that first tries to run the desktop flow on server 1. If that fails it tries to run the desktop flow on server 2.

Often the error is "Cannot create new session to execute unattended run."

Any good suggestions? 

It is possible for me to talk to the other supplier, if some serversettings needs to be changed.

Regards,
Tobias

 

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    What if the flow read the current server to determine if it was on 1 or 2, and if it is on the wrong one, kicks it back as unsuccessful which triggers a restart in 5 mins to try again?

  • TobyOne Profile Picture
    6 on at

    Hi @MichaelAnnis . 
    Thank you for your response.

    I'm not sure how to try the solution you suggested. 


    How can the flow "read" the current server? 

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Use the information here to run ip/config on cmd.

     

    https://visuresolutions.com/how-to-find-server-details/

     

    Read from cmd, use text actions (or the new ‘recognize entity’ function or regex to extract the host name or MAC address. 

     

  • TobyOne Profile Picture
    6 on at

    Oh I understand.

    The problem is, the desktop flow never starts. It doesn't matter if it runs on server 1 or 2 (they have the same desktop setup and uses same network-drive.)

    It seems like the online flow tries to trigger the desktop flow on a random server in the cluster. If this one happens to be the one the load balancing server would have chosen (the one with less users on), the flow runs without a problem. If it isn't, the flow can't start. Does that make sense? (It might also be wrong, but I am not aware of a way to figure out if that is really what is happening.)

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi MichaelAnnis,

     

    For using CMD action of PAD, is there any idea on this error while writing command?

    on99username_0-1642153501367.pngon99username_1-1642153547805.png

    It is ok when I use cmd manually.

    on99username_2-1642153628373.png

     

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    No clue.  Mine worked fine:

    MichaelAnnis_0-1642174924378.png

     

    I thought it might be because you were on a subfolder, buy I used my downloads file, and no error.

    Try just the C:, I wonder if the "." in the subfolder is breaking something.

     

  • TobyOne Profile Picture
    6 on at

    So this is the newest info on this problem. I still hope someone has inputs on the issue and a possible solution.

    The server setup is like this: 
    juserver.png

    As stated earlier, it seems like the online flow tries to trigger the desktop flow on a random server in the cluster.
    If this happens to be the one the connection broker / load balance server would have chosen (the one with less users on), the flow runs without a problem. If it isn't, the connection broker redirects the request to the other RDS host - Power automate gets confused, as it isn't the host it tried to connect to, and the flow can't start.
    (It might be wrong, but I am not aware of a way to figure out if that is really what is happening.)

    Any help is appreciated! (I'll buy you a beer, cake or something else!)

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 258 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 198 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard