i tried to create some code for push data into Active Directory. Btw i'm using Zend Framerowk 2, and for Directory Services i am using Active Directory. I tried to create some function for add data into Active Directory, but i got the problem. The error message always display
Error Messages
0x35 (Server is unwilling to perform; 0000209A: SvcErr: DSID-031A1081, problem 5003 (WILL_NOT_PERFORM)
Here's my code
$ldap = new Ldap($ldap_config);
$ldap->bind();
//add member user into role
$entry = array();
Attribute::setAttribute($entry, 'objectclass', 'top');
Attribute::setAttribute($entry, 'objectclass', 'person');
Attribute::setAttribute($entry, 'objectclass', 'organizationalPerson');
Attribute::setAttribute($entry, 'objectclass', 'user');
Attribute::setAttribute($entry, 'cn', '123ABCD');
Attribute::setAttribute($entry, 'distinguishedname', "CN=123ABCD,OU=Staff,DC=project,DC=company,DC=go,DC=id");
Attribute::setAttribute($entry, 'dn', "CN=123ABCD,OU=Staff,DC=project,DC=company,DC=go,DC=id");
Attribute::setAttribute($entry, 'instancetype', 4);
Attribute::setAttribute($entry, 'displayName', "FebryFairuz");
Attribute::setAttribute($entry, 'sAMAccountName', "123ABCD");
Attribute::setAttribute($entry, 'employeeID', "123ABCD");
Attribute::setAttribute($entry, 'givenName', "Febry");
Attribute::setAttribute($entry, 'mail', "febryfairuz@hotmail.com");
Attribute::setAttribute($entry, 'memberOf', "CN=Default,OU=Role,DC=project,DC=company,DC=go,DC=id");
$result_update = $ldap->add("CN=123ABCD,OU=Staff,DC=project,DC=company,DC=go,DC=id", $entry);
var_dump($result_update);
If i remove Attribute::setAttribute($entry, 'memberOf', "CN=Default,OU=Role,DC=project,DC=company,DC=go,DC=id");
it's runing well and also insert into AD. But if i tried to add attribute of memberOf, i got an error like that. So there's something wrong with my code ?
Or there's something i can do for fix that problem ?
I hope u want to help me..