07-01-2009 7:26 PM
Hi,
We are accessing SAP from VB code using BAPI api's. The code works fine. But we have a requirement to enable single sign on with SNC. We want the program to use NTLM. Can someone give a sample code? We tried with few options but it is not working (it continues to pop up the user login/pass dialog box instead of taking the nt domain user and pass):
*******************Sample***********************
oBAPI.Connection.Client = Client
oBAPI.Connection.System = System
oBAPI.Connection.SystemNumber = SystemNumber
oBAPI.Connection.ApplicationServer = ApplicationServer
'oBAPI.Connection.User = User
'oBAPI.Connection.Password = Password
oBAPI.Connection.SNC = true
oBAPI.Connection.SNCName = "Name"
oBAPI.Connection.Autologon = Autologon
oBAPI.Connection.Language = Language
oBAPI.Connection.TraceLevel = TraceLevel
oBAPI.Connection.LowSpeedConnection = True
oBAPI.Connection.UseSAPRFCIni = False
oBAPI.Connection.Logon(0, False)
******************************************************
I have set "SNC_LIB" to "sncgss32.dll". Do I need to set it to "gssntlm.dll" for single sign on. I searched for this dll but could not locate. I am on Windows XP and SAP server is on Unix.
I would greatly appreciate any help in making this work.
Thanks in advance,
Nilanjan
07-01-2009 7:40 PM
Hi,
If your SAP system is on UNIX then you cannot use NTLM protocol. You should consider a GSS-API library which uses the Kerberos protocol instead. Then,when a user logs onto workstation using Active Directory domain credentials, their kerberos tickets can be used to authenticate them to SAP via SNC. if I understnad correctly, this is what you are trying to do ?
I suggest you first get SAP GUI working on same client workstation, and then you shoudl find that the BAPI API program will work when you comment out the user and password fields.
To make SAP GUI work, since your SAP system is on UNIX you need to use a product from a SAP partner. This is because SAP only provide SNC libraries which use Kerberos if SAP is running on Windows Servers. An example of a product which will do what you want can be found on SAP EcoHub at https://ecohub.sdn.sap.com/irj/ecohub/solutions/trustbrokersecureclient
Please let me know if you have any more questions.
Thanks,
Tim
07-02-2009 12:13 PM
Hi Tim,
Thank you very much for your suggestions. I am checking with the BASIS team here and it appears that we have the required software available.
Thanks again,
Nilanjan
07-02-2009 1:04 PM
Hi,
You caqn look for the "gssntlm.dll" file on sapserv<x> in the directory /general/misc/security/gssntlm .
07-03-2009 9:23 AM
Take a kind look on [SAP Note 352295|https://service.sap.com/sap/support/notes/352295].