Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

LDAP to Active Directory= 'invalid login credentials'

Rambo79Nov 5 2012 — edited Feb 18 2013
Hi

I am looking at setting up Active Directory authentication in APEX, so I am changing the authentication scheme to LDAP Directory

I have completed the host, port, NO SSL, etc under the settings tab

Host : ip address of ad server
Port : 389
Use SSL: No SSL
Distinguished Name (DN) String : domain\%LDAP_USER%
Use Exact Distinguished Name (DN) : Yes

However when trying to run the application and entering my details it keeps bringing back 'invalid login credentials'

What steps have I missed out

I have come across the following code on another thread but where would this go in PL/SQL code?

DECLARE
vSession DBMS_LDAP.session;
vResult PLS_INTEGER;
BEGIN
DBMS_LDAP.use_exception := TRUE;
vSession := DBMS_LDAP.init
( hostname => 'CREDPWY01SDCG01'
, portnum => 389
);
vResult := DBMS_LDAP.simple_bind_s
( ld => vSession
, dn => 'CN=<username>,dc=credit,dc=com'
, passwd => NULL
);
DBMS_Output.put_line('User authenticated!');
vResult := DBMS_LDAP.unbind_s(vSession);
END;

I am not able to authenticate at all when using apex_ldap regardless if I pass NULL for the password, or use the real password.

BEGIN
IF APEX_LDAP.authenticate
( p_username => '<username>'
, p_password => NULL
, p_search_base => 'dc=credit,dc=com'
, p_host => 'CREDPWY01SDCG01'
, p_port => 389
)
THEN
DBMS_Output.put_line('ok');
ELSE
DBMS_Output.put_line('not ok');
END IF;
END;

Edited by: Rambo79 on 05-Nov-2012 03:44
This post has been answered by Tom Petrus on Dec 3 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2013
Added on Nov 5 2012
37 comments
6,043 views