I am currently trying to access Active Directory through the dbms_ldap API in Pl / Sql (Oracle). The problem is that I cannot connect to my own username and password or any other.
However, in C #, I can anonymously connect to this code:
DirectoryEntry ldap = new DirectoryEntry("LDAP://Hostname");
DirectorySearcher searcher = new DirectorySearcher(ldap);
searcher.Filter = "(SAMAccountName=username)";
SearchResult result = searcher.FindOne();
If I try to connect anonymously in Oracle, I get an error message (ORA-31202: LDAP client / server error) when I try to search (and the result code for the binding is SUCCESS) ...
my_session := dbms_ldap.init('HOST','389');
retval := dbms_ldap.simple_bind_s(my_session, '', '');
retval := dbms_ldap.search_s(my_session, ldap_base, dbms_ldap.scope_subtree, 'objectclass=*', my_attrs, 0, my_message);
Why does an anonymous connection work in C # but not in Pl / Sql? Do you have another idea to connect to Active Directory through Oracle?
Help me put them together.
Thank.
Edit 1
When I contact anonymous credentials, I get:
ORA-31202: DBMS_LDAP: / LDAP
00000000: LdapErr: DSID-0C090627, : >
, , ... :
ORA-31202: DBMS_LDAP: / LDAP
80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext
, Active Directory LDAP, ?
2
"result", #, "Path":
LDAP://SERVER_OR_DOMAIN/CN = LAST_NAME \, FIRST_NAME, OU = OU1, OU = OU2, OU = OU3, OU = OU4, DC = SERVER_NAME, DC = EXT1, DC = EXT2
, , , AD . "", "ldap_base", "ldap_user" "ldap_passwd"?