LoginByToken to vCenter Server By Using C# The following sections describe a C# example of using the LoginByToken method. vCenter Server Single Sign On Session Using C#After you obtain a SAML token from the vCenter Single Sign On Server, you can use the vSphere API method LoginByToken to establish a single sign on session with a vCenter Server. To establish a vCenter Server session that is based on SAML token authentication, the client must embed the SAML token in the SOAP header of the LoginByToken request. The C# LoginByToken example uses the following .NET services to support a single sign on session. Persistent vCenter Server SessionsA persistent vCenter Server session relies on a session cookie. When the vCenter Server receives a login request, the server creates a session cookie and returns it in the HTTP header of the response. The client-side .NET framework embeds the cookie in HTTP messages that the client sends to the Server. Sample CodeThe code examples in the following sections show how to use the LoginByToken method with a holder-of-key security token. The code examples are based on the LoginByTokenSample project contained in the vCenter Single Sign-On SDK. The project is located in the dotnet samples directory (SDK/ssoclient/dotnet/cs/samples/LoginByToken).Using LoginByToken in C#A Web Services API client can authenticate by using a token provided by the vCenter Single Sign-On Service. This example shows C# client code for dealing with token authentication. Parent topic: Client Applications for the Web Services API