Key not valid for use in specified state in GetPassword method


GetPassword is not working in Runtime.But the same is working in development environment

Steps to reproduce:

store a password in GetPassword and try to use the password for login.

Current Behavior:

In Runtime GetPassword method giving Key not valid for use in specified state.
error. But in development or local machine I can able to retrieve the password.

Expected Behavior:

getpassword should return the password.

Studio/Robot/Orchestrator Version: 2016.1.61.37 Runtime Version

Last stable behavior:
Last stable version: stable
OS Version:
Others if Relevant: (workflow, logs, .net version, service pack, etc):

Hi Madhan

I’ve tried your scenario with Community Edition and it works on both development and production.
Do you have the 2017.1 version?
The password you’re storing is associated with the current user. Do you have the same user in runtime? Maybe this is the cause of the error.

Which user your are referring ? am assuming ‘User’ as user account, In Development machine am using my own credentials. But in production am log into the server with service account and downloading the xaml files from SVN source control. I don’t have 2017.1 version. we are using 2016.1 version

Thank you.

GetPassword should not be used in this case. It will not work on another computer.



I have faced the same issue while doing the training exercise (acme website) from UI Automation With the Modern Experience course. My solution was to remove this activity (as for the training it doesn’t play a significant role) and save the password as a string variable.