I tried to run a attended ui flow on scheduled Azure VM but i get this error: "No unlocked user sessions found on the target machine. Cannot execute attended desktop flow"
This post say its posible but im not sure: Using Azure VM's to run UI Flows (RPA) - FlowJoe.io
I dont have permission to upload pitures, there is a ScreenShot: It's possible unlock user session with azure automation? - Microsoft Q&A
Solved! Go to Solution.
If you are not operating the VM as a user, then you're basically violating Microsoft's attended RPA license terms.
Page 14 "The bot must operate concurrently with the user on the same workstation"
Why don't you just get an unattended RPA license?
I am having the same issue except with local desktop gateway instead of Azure VM. My gateway is in a Hyper-V VM. Same exact error despite trying all the tricks I can imagine.
I got mine working. The connector to the gateway requires your local user account's login credentials.
It's confusing because the gateway settings references some PBI (Power BI) something or other credential, but that is not what you use for the gateway connector in Power Automate. The PBI thing I am talking about is some pseudo-account-credential looking thing that has like PBISE or some such letter sequence in what would be the username. I was confused by this and thought it might be some auto generated login credential, like API keys. I even tried establishing the gateway connector using that thing, but that was not correct to do. You must use credentials of local user account where the gate way is installed.
Part of my problem is that Hyper-V Windows 10 virtual machines do not have a local account password for the default user account within the virtual machine. Or that default user account logs itself in anyway, so I was not sure how to find its password. So I made a second local user account within my VM and used its credentials for the PAD gateway connector in the Power Automate cloud flow run. I just log in as my second local user, then Power Automate and the gateway do the rest. Look out for the two PAD taskbar icons wherever you install the gateway and intend to run your cloud-triggered PAD flows. If you have the taskbar icons showing up, you are probably good to go on the desktop side of the equation. Then it's just a matter of using the local user account's login credentials to authenticate the PAD cloud action connector to your gateway.
Ask me specific questions and maybe I can help you.
EDIT: That user account credential looking crap is NT Service\PBIEgwService (as in Power Business Intelligence Gateway Service), and you will see it referenced several times whenever you set up your gateway. DO NOT USE THAT TO AUTHENTICATE YOUR CONNECTOR - it won't work. That credential is, I'm guessing, what authorizes the gateway to do its bidding on your PC. Use the local user account like [Name of Computer]\[Username] e.g. My-PC\TurdFerguson. If you don't login with local credentials e.g. you login with your Microsoft account, you will need to make a local user account to set up your gateway and run cloud flows on it. Or I do not know of a workaround to do it without local user account credentials anyway. Ok thanks for coming to my TedTalk 🙋♂️
Lol, posting in these forums using Google Chrome on Windows 10, if you press WINDOWS key + period and select the "man raising hand" emoji, they convert it to "woman raising hand" + "male symbol" lmao!
I will try this!
@HEATFreight do you think its will work with an scheduled Azure VM? Because when its start via Logic Apps i'm not sure if the user is logged in...
Maybe Azure requires unattended? ...which is a higher subscription level... Or to the extent that you are connected and logged in as a local user of the Azure VM (with gateway installed and connected to your account mind you...), you can probably run attended in that Azure VM. I'm not sure how that works as I am using Hyper-V and have never spun up an Azure VM. That is actually one thing I intend to try soon though, as I do not want to run this on my local physical machine forever. Running attended means you must be connected and logged into the VM, wherever it resides, which is a bit of a hurdle with a local VM since it uses up some of your hardware resources. Clearly that's not as big of a hurdle when it's just an Azure portal and not actually using your local resources. The next step up in functionality being unattended, where I am assuming the VM need only be powered on but not necessarily have a user logged in.
Eventually I plan to do all of that, but I tell you what... it was pretty easy to set all of this up in Hyper-V on my PC. You should try in Hyper-V first if you are able to, because maybe it's less complicated than deploying in Azure 🤷♂️
On Azure VM its work when i logged in
If i automate the start of the VM doesnt work but flowje says in this post the automated VM work with attended and unatennded Flow Using Azure VM's to run UI Flows (RPA) - FlowJoe.io
I twitted them and he say me "the VM has a user session so you can run attended RPA flows"
Yep i can run only when i logged in
But when i turn on the VM via Logic Apps or Azure Automation i cant run the attended ui flow. On the post flowje says they can do that with attended and unattended ui flow...
Yeah you can't run unattended without upgrading to the higher subscription level. If you have access to Power Automate at all, you get attended desktop flows by default. Unattended is not available by default without paying for a higher subscription. Or that is my understanding.
Hello @dboetschjump !
I was wondering if you were able to get it working without manually logging in.
I tried FlowJoe's method and I get the exact same error: "No unlocked user sessions found on the target machine. Cannot execute attended desktop flow". Yet, when FlowJoe responded to you he said "the VM has a user session so you can run attended RPA flows".
Hmmm.... what is the difference between the error message and FlowJoe's response? The word "unlocked". I'm thinking our problem has to do with the Azure Run As... will investigate further.
Keep 'em flowin'
Yeah I understand that. But that would mean that FlowJoe's technique cannot work in attended mode. He states the contrary and I'm trying to understand why.
The blog post shows a configuration for unattended automation. Of course you should be able to RDP into the VM to run a flow manually in attended mode. 😉