Hi Everyone,
Good day! I was wondering if it is possible to do LDAP login in PB 12.5 CLASSIC. If its possible can you give me ideas on how to do it? Hoping to hear from anyone of you the soonest possible.
Thank you so much!
Hi Everyone,
Good day! I was wondering if it is possible to do LDAP login in PB 12.5 CLASSIC. If its possible can you give me ideas on how to do it? Hoping to hear from anyone of you the soonest possible.
Thank you so much!
Hi would you mind to share the complete code of your approach? I wan't to test it if it is working. If its not too much to ask. Thank you.
Totally appreciate your suggestion but I am just a newbie in PB world. I actually didn't know where to start in building ldap login. All I have is webservice URL Im really sorry. Do you have any idea what would be my first step? Thank you.
Thank you so much for this. I really appreciate all the help. However, do you have a sample of it? Zip file? I am a newbie and in search of how to do it. I am creating a simple login that will consume ldap.
Hi Thanks for your reply and help. In anyways, do you have a sample a zip file maybe? Or maybe you can tell me what is my first step would be. Thank you.
You don't have to use a web service to authenticate. I used the ADVAPI32.DLL. Here is the Local External Functions you can use if you want to use that DLL.
function long LogonUser(string username, string domain, string password, long logontype, long logonprovider, ref ulong hToken) library "Advapi32" alias for "LogonUserA;Ansi"
function boolean CloseHandle(ulong w_handle) library "Kernel32.dll"
function long GetLastError() LIBRARY "kernel32" alias for "GetLastError"
I setup a nvo with a of_logon function that took arguments for Domain, User Id, PW and a reference string for error.
Long ll_rc
ulong lul_handle
CONSTANT LONG LOGON_TYPE = 3
CONSTANT LONG PROVIDER = 0
CONSTANT String FUNCTION_NAME = "of_logon"
ll_rc = LogonUser(as_user, as_domain, as_pw, LOGON_TYPE, PROVIDER, lul_handle)
IF ll_rc > 0 THEN
CloseHandle(lul_handle)
as_error = FUNCTION_NAME + " - success"
return 1
ELSE
// ll_rc = GetLasterror( )
as_error = FUNCTION_NAME + " - logon failed. Invalid user id or password. Please be sure to use your network id and password"
return ll_rc
END IF
Hi Sir, I follow this instruction
https://blogs.sap.com/2015/04/09/consuming-a-web-service-with-powerbuilder-125-classic/
but unfortunately can't make it work because of the pre requisite applications which is Visual C# 2010. Wasn't able to find any installer. How you can help me from scratch I'm really new into this. Thank you.
Hi thank you so much for your suggestion but I am just a newbie in PB world. I actually didn't know where to start in building ldap login. All I have is webservice URL Im really sorry. Do you have any idea what would be my first step? Thank you.
Hi Avory;
Here is a presentation that I did at a PB conference on interfacing with Active Directory via LDAP from a PB Application. HTH
https://sourceforge.net/projects/stdfndclass/files/Presentations/Active%20Directory
Regards ... Chris