I am trying to add a group to my Active Directory using the UnboundID LDAP SDK and continue to receive error 503: will fail.
I checked that I am using an SSL connection and that I am connecting to a user who is a member of the Administrators group, who, if I am mistaken, gives him the right to create new entries.
I also raised the LDAP interface event logging level to 5, and the event viewer logs a series of events, none of which are useful for explaining why the service does not want to perform my write entry operation.
Any ideas on what might cause this problem?
The following is an example scala code that I use:
val connection = connect("MyAdminUser", "MyAdminPass") val addGroupResult = connection.add("CN=TestGroup2,OU=Groups,OU=mydomain,DC=mydomain,DC=local", new Attribute("objectClass", "top", "group"), new Attribute("name","TestGroup2"), new Attribute("sAMAccountName","TestGroup2"), new Attribute("sAMAccountType","268435456"), new Attribute("objectCategory","CN=Group,CN=Schema,CN=Configuration,DC=mydomain,DC=local"), new Attribute("cn","TestGroup2"), new Attribute("distinguishedName","CN=TestGroup2,OU=Groups,OU=mydomain,DC=mydomain,DC=local"), new Attribute("instanceType","4"), new Attribute("groupType","-2147483646") ) private def connect(user: String, pass: String) = { val options = new LDAPConnectionOptions() options.setFollowReferrals(true) val sslUtil = new SSLUtil(new TrustAllTrustManager()) val socketFactory = sslUtil.createSSLSocketFactory() new LDAPConnection(socketFactory, options, host, securePort, DN(user), pass) }
And here is the error message I get:
Exception in thread "main" LDAPException(resultCode=53 (unwilling to perform), errorMessage='0000209A: SvcErr: DSID-031A104A, problem 5003 (WILL_NOT_PERFORM), data 0', diagnosticMessage='0000209A: SvcErr: DSID-031A104A, problem 5003 (WILL_NOT_PERFORM), data 0')