Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need help - enabling single sign on (SSO) with BAPI

Former Member
0 Kudos

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

4 REPLIES 4

tim_alsop
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Hi,

You caqn look for the "gssntlm.dll" file on sapserv<x> in the directory /general/misc/security/gssntlm .

0 Kudos

Take a kind look on [SAP Note 352295|https://service.sap.com/sap/support/notes/352295].