Skip to main content

Notifications

Community site session details

Community site session details

Session Id : otEspDEgCGFrfh0vF/UlBc
Power Automate - Power Automate Desktop
Unanswered

Using Edge with multiple profiles?

Like (0) ShareShare
ReportReport
Posted on 7 Feb 2022 07:06:50 by

I'm trying to get some fairly simple (and identical) tasks automated for multiple user profiles in one flow.  However, whilst it's a simple job when I'm dealing with only one profile, I seem unable to scale it to multiples.

 

The pseudo code is essentially as follows:

*** 

For each profile, have a look in it's allocated Edge browser and...

   if there's anything needing attention ("is there a defined text present on the webpage?")

      Press a few buttons to basically process it

Then go to sleep, wake up a bit later and rinse and repeat forever

***

 

When I do it on a single profile, I load it up using "Launch new Microsoft Edge" (launch mode = launch new instance) and store the instance into the variable Edge1.  I then use that variable to do (hard-coded) navigations, new tabs, button presses etc. and it all works perfectly.

 

I'm thinking that what I'd like to do is basically say "For the next profiles, load up new Edges into browser variables Edge2, Edge3 etc. and then perform the same actions on each, but that's only a guess on direction (which I have not yet managed to get working).

 

* Good News 1: I'm happy to hard code everything, if I can then just come in in the morning and run the code (I don't need the profile list to be dynamic or anything as changes are rare)

* Good News 2: If I need to do any setups before running the code in the morning, that's ok too as long as I don't actually have to rewrite the flow each day.

* Bad news: I'm new at Power Automate, so don't actually know what I'm doing 😉

 

* Environment: Win11 (21H2, Build 22000.369), dual monitors, fast PC, MS Edge Chrome (98.0.1109.43).  Profiles are already set up on Edge and I can manually jump between them without a problem. 

 

* Things I've tried:

- Clicking on the next profile in Edge pops up a new browser instance, which would be fine if I had a variable holding that browser instance.  If I could somehow reference it as (say) "Edge2", that would make things easy.

- Setting up shortcuts for each profile will certainly bring up the Edges under different profiles, but again, without a reference variable, I can't communicate with them as browsers

- Setting up the whole thing as UI rather than Web automation.  As well as being rather tedious, I found that Windows tended to change the name of the windows at each run.  This actually meant that I could in fact get it all working, but had to recode the whole thing (setting up new UI elements) every day!

 

Any suggestions gratefully received!

 

JC

 

  • robroi2000 Profile Picture
    11 on 04 Nov 2023 at 12:56:11
    Re: Using Edge with multiple profiles?

    You get a browser instance, but you cannot use it if Edge was started with a defined profile (using msedge.exe argument --profile-directory=ProfileName) because you get an error for every action using this instance.

    The same error occurs if you define a default profile for external links or entries for the automatic profile switch in the browser settings.

    The only work-around I found is to set the default profile in the registry (create missing keys) before opening the browser:

    Path: HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Edge

    Property Name: EdgeDefaultProfileEnabled

    Property Type: REG_SZ (Text)

    Property Value: ProfileName (see last part of profile path in edge://version)

  • Jamar_Forsythe Profile Picture
    Microsoft Employee on 14 Oct 2022 at 22:24:59
    Re: Using Edge with multiple profiles?

    Use the "Run Application" action like in the post before this one, then use the "Launch New Microsoft Edge" action, but set it to "Attach to running instance" and choose the property you want to connect by, that will then produce a browser handle.

     

    Jamar_Forsythe_0-1665786243952.png

     

  • neerajverma7876 Profile Picture
    6 on 26 Jul 2022 at 10:44:40
    Re: Using Edge with multiple profiles?

    "This wont give us Browser Instance Hence unable to use Browser Automation Tools" How to fix?

  • Guriga Profile Picture
    188 on 23 Feb 2022 at 10:40:29
    Re: Using Edge with multiple profiles?

    Hi,

     

    In Edge 

     

    1. Type edge://version into the address bar and press Enter. You should see a page of data. 
        

    2. One item in the list is Profile path, whose last element (after the last '\') is the 'profile directory name,' probably Profile n. Copy the name or make a note of it. 

    In PAD run application
    Guriga_0-1645612525835.png

    Then you can use the focus window

    Guriga_1-1645612728384.png

     

     

    As you can see there is work and personal edge in the list.

     

    Hope the content above may help you.

    Best Regards

    If my answer helps, then please consider Accept it as the solution to help the other members find it more quickly.

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
Loading started