cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dboetschjump
Frequent Visitor

It's possible run a attended ui flow on scheduled Azure VM?

Hi
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

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

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"

https://go.microsoft.com/fwlink/?LinkId=2085130&clcid=0x409

 

Why don't you just get an unattended RPA license?

View solution in original post

22 REPLIES 22
HEATFreight
Advocate III
Advocate III

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.

ramadi
Frequent Visitor

Did you guys find a solution?

HEATFreight
Advocate III
Advocate III

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 🙋‍♂️

HEATFreight
Advocate III
Advocate III

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!

ramadi
Frequent Visitor

I'm using the local user but it doesn't work!!

dboetschjump
Frequent Visitor

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

HEATFreight
Advocate III
Advocate III

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 🤷‍♂️

HEATFreight
Advocate III
Advocate III

lol there's that emoji equivalence bug. female shrug+ male symbol = male shrug. i swear to god i typed a male shrug emoji there. so funny!

dboetschjump
Frequent Visitor

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"

So you got it working then?

dboetschjump
Frequent Visitor

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

GanCW
Resolver II
Resolver II

Attended flow requires the user account to be login before it will run.

Unattended flow requires a different license and user account must not be logged in.

 

 

HEATFreight
Advocate III
Advocate III

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'

 

Charles

Attended automation is meant to run with a user present, so the screen needs to be unlocked.

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

dboetschjump
Frequent Visitor

Thanks @CharlesS! I have the same doubt
@fraenK The blog says unattended and attended mode, maybe its a mistake. 

It's not a mistake, you can run both, but there is a different behavior, which is not mentioned in the blog.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,841)