Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Power Automate Desktop
Answered

Flow runs in attended mode, fails in unattended mode

Like (0) ShareShare
ReportReport
Posted on 15 Sep 2021 13:52:27 by 12

I have a UI flow that runs perfectly in attended mode.

 

When I setup a web flow to trigger the desktop flow in unattended mode, it runs for a bit then fails on UI elements like pressing a button or populating a text field.

 

I have already tried this: https://docs.microsoft.com/en-us/power-automate/desktop-flows/how-to/set-screen-resolution-unattended-mode

I set the flag to true, then restarted power automate. No luck. Since I built the flow on a 1440p monitor, I also changed the resolution, and it still fails.

 

It seems to keep failing at button presses very early on in the flow. I tried adding a waits for a few seconds before these actions, but it still fails.

 

Is there anything else I should try or any information I can provide to help troubleshoot?

  • jhomeres Profile Picture
    4 on 14 Feb 2023 at 18:50:54
    Re: Flow runs in attended mode, fails in unattended mode

    this doesn't work anyways, if the vnc viewer has to be logged in all the time, then you can't run a flow in unattended mode.  which is where the problem is.  this is ultimately frustrating, to the point where it has become a pain in my ass.

  • Verified answer
    mattyncu Profile Picture
    12 on 15 Sep 2021 at 19:14:37
    Re: Flow runs in attended mode, fails in unattended mode

    The solution is to use VNC viewer/server to connect to your host unattended machine. VNC allows you to disable the proxy, making it seem like you are physically on the server to mimic the behaviour of unattended mode.

     

    With VNC, this is done via File > Preferences > proxy > do not use a proxy.

     

    Let's say you have an Azure VM that you will use to run unattended flows. This is your host. When you use Microsoft Remote Desktop to connect to the host, you have a client device (your own laptop, desktop, workstation) that also serves as as a proxy for the traffic going to the host.

    When you run an unattended flow, there is no proxy - it's being run on directly on the host. It's as if someone is physically using the machine.

     

    My particular problem was that our in house application registers information about the device accessing it. When using RDP to build he flow, it registered my laptop. This registration is done only the first time through a prompt that won't appear again. So, my laptop was registered and I proceeded to build the flow not accounting for this registration process.

    When I tried to use the flow in unattended mode, the Azure VM host hadn't been registered before and thus there were prompts on the screen that my flow couldn't handle.

    Thanks to @Henrik_M I incorporated screenshots into my flow to see that this was happening.

    Once I got that sorted out I did have to add additional waits into the flow before a few specific button press actions - these waits are not necessary in attended mode but for some reason are in unattended.

  • mattyncu Profile Picture
    12 on 15 Sep 2021 at 14:48:36
    Re: Flow runs in attended mode, fails in unattended mode

    Thanks @Henrik_M this helped make some progress....

     

    At my company we have a custom application that when launched, will prompt you to sign in if if you've configured the application on the workstation already. If you haven't configured the application, you get a prompt for it. It should be based on the user account used to login to the machine.

     

    Since the configuration is only needed the first time, my flow is setup to simply sign in.

     

    However, I noticed in the screenshot, the configuration screen is showing.

     

    Does unattended mode use a different account to login to the machine or something?

     

     

  • Henrik_M Profile Picture
    2,006 Super User 2024 Season 1 on 15 Sep 2021 at 14:11:13
    Re: Flow runs in attended mode, fails in unattended mode

    Try saving a screenshot before the error, to see if the UI is how it should be.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 18 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 6

#2
John_Mavridis Profile Picture

John_Mavridis 6 Microsoft Employee

Overall leaderboard