From version 1.6 on ERPConnect also supports SSO scenarios. The SAP system must be configured for the use of SSO, please refer to the SAP documentation for further details.

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.

Click to open C# example.
using(ERPConnect.R3Connection cont = new ERPConnect.R3Connection())
{
    cont.Host = "duncan"; 
    cont.SystemNumber = 7; 
    cont.Client = "800"; cont.Language = "EN"; 
    cont.UserName = "Theobald"; 
    cont.Password = "pw"; 
       
    string ssoticket = cont.GetSSOTicket();
}

If there is a ticket available (created by ERPConnect or another application) use OpenSSO(…) to establish the connection without user credentials:

Click to open C# example.
using(ERPConnect.R3Connection conts = new ERPConnect.R3Connection())
{
    conts.Host = "duncan"; 
    conts.SystemNumber = 7; 
    conts.Client = "800"; conts.Language = "EN"; 
       
    conts.OpenSSO(ssoticket);
}