If you need a quick and safe way to ask a human for login details in UiPath Studio without turning your robot into a secret hoarder this tutorial will save your dignity. We will walk through the Get Username Password activity how to handle the Username and SecureString Password and where to stash secrets when you want less manual drama. Keywords you will see along the way include UiPath Get Username Password SecureString Orchestrator Windows Credential Manager and credentials management for RPA.
Drag the Get Username Password activity from the Activities panel into a Sequence or Flowchart. It shows a modal dialog that prompts the user for username and password which is perfect when a human must supply credentials interactively. Use a modal only when interaction is expected otherwise your process will hang like a forgotten coffee mug.
Set the Title and Label properties to tell users why the robot is asking for secrets. Assign the Username output to a String variable and assign the Password output to a SecureString variable. Yes SecureString is awkward to work with but it is how UiPath encourages safer handling of secrets.
SecureString keeps the value protected in memory until you need it. Treat conversions to plain text as a risky but sometimes necessary evil. Convert only when an activity absolutely demands plain text and then clear memory as fast as humanly possible.
When you must turn a SecureString into plain text use System.Runtime.InteropServices helper methods available in .NET. The usual pattern is to marshal the SecureString into an unsecured memory block read the value and then zero out and free that memory. Do not keep the plain password around longer than one line of code and do not log it unless you enjoy existential regret.
Tip Use a short helper method to convert and immediately erase the unmanaged memory after use. Avoid converting inside a big loop unless you like making security mistakes at scale.
Activities that accept plain text can use the Username variable directly. For activities that accept SecureString give them the Password output as is. If a downstream activity requires plain text convert briefly then clear the converted string reference and let the garbage collector and your cleanup code do the rest.
If credentials are not meant to be typed each run prefer Orchestrator assets or Windows Credential Manager. These central stores let you use the Get Credential activity so your workflow can pull secrets without human intervention. This is also the right move for unattended robots and any production worthy RPA deployment.
Handle the user hitting Cancel or leaving fields blank. Check for null or empty values and present friendly messages or retry logic so the workflow can fail cleanly. A polite failure beats a hard crash and fewer support tickets will improve your reputation faster than heroic debugging stories.
Follow these steps and your UiPath workflows will ask for credentials like a polite spy and handle them like a paranoid librarian. You get the convenience of interactive input plus the hygiene rules needed for real world RPA deployments.
I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!
This is a dedicated watch page for a single video.