Skip to content

SSO with Log On Tickets

As of ERPConnect version 1.6 SSO scenarios are supported.
There are several methods to get an SSO Ticket depending on the SAP Infrastructure in the company.


To use SSO the SAP system must be configured as described in SAP Help - Single Sign-On Configuration.

Logon with SSO-Tickets

Create an SSO-Ticket

To create an SSO ticket the R3Connection class provides the method GetSSOTicket. All logon data must be provided once to create the ticket as shown in the code below.

Create SSO Ticket
using(ERPConnect.R3Connection cont = new ERPConnect.R3Connection())
    cont.Host = "";
    cont.SystemNumber = 7;
    cont.Client = "800";
    cont.Language = "DE";
    cont.UserName = "alice";
    cont.Password = "pw";

    string ssoticket = cont.GetSSOTicket();


If there is a ticket available, you can establish the connection without user credentials:

Connect to SAP via SSO Ticket
using (ERPConnect.R3Connection conts = new ERPConnect.R3Connection())
    conts.Host = "";
    conts.SystemNumber = 7;
    conts.Client = "800";
    conts.Language = "EN";
    conts.LogonTicket = ssoticket;


For information on how to login to SAP using the cookie from the SAP Portal Ticketissuer, refer to Login to SAP with an SSO Logonticket.