Warning: Deprecated documentation
You are using the old version of the online help for ERPConnect.
Make sure to use the documentation within the new HelpCenter for ERPConnect.

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.

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

Logon with SSO-Tickets #

Creating SSO-Tickets

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.

using(ERPConnect.R3Connection cont = new ERPConnect.R3Connection())
{
    cont.Host = "sap-erp-as05.example.com";
    cont.SystemNumber = 7;
    cont.Client = "800";
    cont.Language = "DE";
    cont.UserName = "alice";
    cont.Password = "pw";

    string ssoticket = cont.GetSSOTicket();
}

Logon

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

using (ERPConnect.R3Connection conts = new ERPConnect.R3Connection())
{
    conts.Host = "sap-erp-as05.example.com";
    conts.SystemNumber = 7;
    conts.Client = "800";
    conts.Language = "EN";
    conts.LogonTicket = ssoticket;

    conts.Open();
}

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