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 / Keep a login process a...
Power Automate
Answered

Keep a login process as a separated desktop flow

(0) ShareShare
ReportReport
Posted on by 63

Hello,

How can I have a login process of web application as a separated desktop flow?

 

As we may build multiple desktop flow for one web application, I was thinking that it may be efficient to have the login process as a separated desktop flow and call it from other desktop flow using "Run desktop flow" command.

 

[Login flow] => [Main flow]

 

In the Login flow, I created an output variable "Login_Browser_Instance" and assigned the value of "Browser" variable to the output variable.

 

In the Main flow, I called the Login flow using "Run desktop flow". "Login_Browser_Instance" was produced in the "Run desktop flow".

Then, I assigned the value of "Login_Browser_Instance" to "Browser" variable in the Main flow.

 

In this way, I was thinking that I should be able to pass the browser instance from the Login flow to the Main flow and keep using the browser in the Main flow.

 

However, when I ran the Main flow,  I got an error as "Argument 'BrowserInstance' must be 'Web browser instance'."

The value of both "Browser" variable and "Login_Browser_Instance" variable are both "WebBrowser Instance"; however, it looks like the "Browser" variable and "Login_Browser_Instance" variable are not recognized as a Web browser instance. I also tried to add Web UI actions, but Web browser instance in the "Select parameters" says "No options available".

 

Would be great if you could provide me any suggestion on this.

Thank you.

  • AS-06081019-0 Profile Picture
    1,738 Super User 2024 Season 1 on at

    @kokitabayashi Could you please try it using subflows. Refer it: https://devinknightsql.com/2021/08/10/using-subflows-in-power-automate-desktop/

     

    https://docs.microsoft.com/en-us/power-automate/desktop-flows/designer-workspace

     

    Cheers,

    Ankesh

    --------------------------------

    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • Gidi Profile Picture
    601 on at

    Hi, it‘s only a guess, because I can’t test it right now. As far as I know the Input/Output variables are text strings only and I would try to keep the browser session after login as foreground window and fetch the window to use it for launch browser action. 

    Perhaps browser window title could be used also instead of browser instance. 

  • kokitabayashi Profile Picture
    63 on at

    Thank you for your comment! I was originally seeking the way not to use the subflows but use the separated flow because it can be more independent from the main flow and reusable but, if that is not an option, I think don't have any other choice other than going the subflows path as you suggested.

  • kokitabayashi Profile Picture
    63 on at

    Thank you for your comment. It is interesting to hear that Input/Output variables are text string only. Hope, in the future update, it can handle other types of variables, as well.

  • Verified answer
    VJR Profile Picture
    7,635 on at

    The June update now has support for additional datatypes for the Input/Output variables.

    https://flow.microsoft.com/en-us/blog/power-automate-for-desktop-june-2022-update/

     

     

    VJR_0-1656557616016.png

     

     

    Additionally I read your original post and the Browser instance cannot be passed that way even through the above newly added datatypes.

     

    You need to have your Flow designed in such a way that it attaches to an already opened browser and creates an Instance and uses that instance down the flow. This is possible using the Attach dropdown option in the Launch action.

  • kokitabayashi Profile Picture
    63 on at

    Thank you for your comment. This was really helpful. The solution you mentioned worked perfectly.

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 227 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 132

Last 30 days Overall leaderboard