You can log in securely to a vRealize Automation server with the API Explorer.

About this task

When running a script in UNIX, you can prevent the plaintext password from appearing in the spring-shell.log file by storing the password in a file and redirecting standard input from that file.

This procedure uses interactive mode. See Use the Interactive Mode for more information.


  • Install the API Explorer, if necessary.

  • Your PATH environment variable must contain the location of the vcac-cli (UNIX) or vcac_cli.bat (Windows) script.


  1. Enter the login command string in a Command Prompt window.




    vRealize Automation URL


    vRealize Automation username with fully qualified domain name


    Tenant name

    login --url vcac_url --user username@fqdn --tenant tname
  2. Enter the password, when prompted.
  3. If running in script mode, enter the password by redirecting standard input.


A successful login returns the vcac-cli> prompt without an error message.

If you omit the --tenant option, the command logs you in to the default tenant.

An error returns an explicit message. The following are possible error messages.

Error Message


Command failed java.lang.RuntimeException:

The hostname specified in the --url parameter is not a known host name. Check your spelling.

Command failed com.vmware.vcac.authentication.sts.AuthenticationFailedException: com.vmware.vim.sso.client.exception.AuthenticationFailedException: Provided credentials are not valid.

The specified -user or -password value(s) are incorrect. Check spelling, check to make sure you have specified the correct tenant.

Command failed org.springframework.web.client.HttpClientErrorException: 400 Bad Request

The specified -tenant value is unknown. Check your spelling.

Logging in

Log in to API Explorer.

Welcome to vCAC CLI. For assistance press or type "hint" then hit ENTER.
vcac-cli>login --url --user administrator@vsphere.local
Please enter your password: ******

The password is masked for security purposes and does not appear in spring-shell.log.

vcac-cli>login --url
--user administrator@vsphere.local < /tmp/password.txt