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 / Passing text to userna...
Power Automate
Unanswered

Passing text to username and password in Settings

(0) ShareShare
ReportReport
Posted on by 2

I set up a flow to automate the creating of network folders in our HR Employee files, but first it pings the network file to ensure the user is connected. If the ping fails or throws an error, it runs a subflow to connect to a pre-named VPN. If that fails because it's not set up, it runs another subflow to set up a new VPN, which I recorded on my desktop. I added an input by the user for their username and password, which creates two variables, then I pass those variables to the username and password fields for the VPN setup. The username variable has a default value that contains the domain for the VPN setup.

 

Can't figure out why the VPN keeps saying the username and password is incorrect when I test it. I've tried a few variations, including joining two variables for the domain. The variables are returned trimmed.

 

When I'm logged in to the VPN, everything works great. When I'm not logged in and the named VPN is present, it works fine. In fact, everything works when it ADDS the VPN, just not the username and password. I can manually enter my creds as DOMAIN\username then my password and it works, so the VPN settings are right.

 

Any ideas?

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

 

addVPN.jpg

 

  • sunilb Profile Picture
    Microsoft Employee on at

    Please try following approach: 

     

    Inside  Populate text field in window action pass the variable in following way 

     

    DomainName\%Username%

     

    In password field pass the variable %UserPass%

     

    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.

  • charles_ross_oh Profile Picture
    91 on at

    Make sure you trim the text as you pass it - often I find a string has picked up a space or a line feed while building a step, especially when copy/paste happens. The flow build environment tends to mask such characters.

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard