Authenticate to vCenter Server with vCenter
Single Sign-On Credentials
vCenter Server
with vCenter
Single Sign-On
CredentialsYou can use your
vCenter
Single Sign-On
credentials with basic authentication to establish a session with a vCenter Server
system.To perform this task, you must have:
- The IP address or FQDN of yourvCenter Serversystem
- ValidvCenter Single Sign-Onuser name and password
The single-factor basic authentication is the
simplest method to authenticate to
vCenter Server
. You connect to the vSphere
Automation
API endpoint with your vCenter
Single Sign-On
user name and password. The vSphere
Automation
endpoint checks whether the user credentials are
present in vmdir, a vCenter
Single Sign-On
component. On success, the system returns a session identifier that you can use for
subsequent API calls.- Call the interface with the base-64 encoded value of yourvCenter Single Sign-Onuser name and password separated by a colon (username:password) in the authorization header.POST https://<vcenter_server_ip_address_or_fqdn>/api/session Authorization: Basic <username:password>On success (status code 201), the system returns a session identifier. For example,"a5adf880fc8e1e2944a541a4c7d74465".
- To authenticate subsequent API calls, pass the session identifier as a request header.vmware-api-session-id: <session_ID>VMware encourages you to refrain from using basic authentication and adopt token-based authentication, as it is more secure and provides more flexibility.