Skip to content

SSO and SNC

The RFCServer class supports SAP connection with SSO and SNC.
The RFCServer class works similarly to the R3Connection class, see ERPConnect with SSO with SNC.

Note

Note the prerequisites described in SSO with SNC - Prerequisites beschrieben.

SAP Connection with SSO and SNC

The RFCServer class provides the property SNCSettings. Assign the partner name in the SAP transaction SM59 (e.g. p:RFCServerSNC@THEOBALD) to the property OwnName of SNCSettings.

SSO and SNC
RFCServer rfcServer = new RFCServer();
rfcServer.GatewayHost = "sap-erp-as05.example.com";
rfcServer.GatewayService = "sapgw00";
rfcServer.ProgramID = "SNCTEST";
rfcServer.SNCSettings.Enabled = true;
rfcServer.SNCSettings.Mechanism = SNCMechanism.Kerberos5;
rfcServer.SNCSettings.OwnName = "p:RFCServerSNC@THEOBALD";

rfcServer.Protocol = ClientProtocol.RFC;
rfcServer.CanReceiveIdocs = true;
rfcServer.IsUnicode = true;

RFCServer-Destination

Note

If SNC is used with Kerberos and Active Directory, the Active Directory account used for the RFC server must have a Service Principal Name corresponding to the partner name in SAP.

RFCServer-AD


Last update: June 4, 2024