Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The server is unwilling to process the request. error -2147016651 (80072035)

888 views
Skip to first unread message

José Juan Rodríguez

unread,
Jul 16, 2002, 5:51:12 AM7/16/02
to
I've got a really simple bit of VB6 code to add a user to Active Directory
via IADs.


Set objContainer = GetObject(LDAP://OU=lfkjaskl,DC=fsadfklñ,DC=com)
Set objUser = objContainer.Create("user","testuser1")
objUser.put "sAMAccountName", "testuser"
objUser.put "userPrincipalName", test.user@fsadfklñ.com
objUser.put "userPassword", "password"
objUser.SetInfo


This code persistently returns


error -2147016651 (80072035)
Automation Error
The server is unwilling to process the request.


The only thing that I can find is that apparently there's a violation of the
server's policies regarding new users, but the event log on the server
doesn't show anything. Does anyone know how I can programatically find out
*why* the server is uwilling to cooperate?


Marc Scheuner

unread,
Jul 16, 2002, 9:23:56 AM7/16/02
to
On Tue, 16 Jul 2002 11:51:12 +0200, "José Juan Rodríguez"
<jrodr...@gpm.es> wrote:
>I've got a really simple bit of VB6 code to add a user to Active Directory
>via IADs.
>
>Set objContainer = GetObject(LDAP://OU=lfkjaskl,DC=fsadfklñ,DC=com)
>Set objUser = objContainer.Create("user","testuser1")

You need to prefix the user name with a cn= !!

Set objUser = objContainer.Create("user","cn=testuser1")

Marc

José Juan Rodríguez

unread,
Jul 29, 2002, 2:34:26 AM7/29/02
to

"José Juan Rodríguez" <jrodr...@gpm.es> wrote in message
news:eHczp4KLCHA.2588@tkmsftngp08...

I've got a really simple bit of VB6 code to add a user to Active Directory
via IADs.


Set objContainer = GetObject(LDAP://OU=lfkjaskl,DC=fsadfklñ,DC=com)

Set objUser = objContainer.Create("user","cn=testuser1")


objUser.put "sAMAccountName", "testuser"
objUser.put "userPrincipalName", test.user@fsadfklñ.com
objUser.put "userPassword", "password"
objUser.SetInfo


This code persistently returns (just in the line ---> objUser.SetInfo).

José Juan Rodríguez

unread,
Jul 29, 2002, 6:52:37 AM7/29/02
to

Torgeir Bakken

unread,
Jul 29, 2002, 7:10:50 AM7/29/02
to
"José Juan Rodríguez" wrote:

> objUser.put "userPrincipalName", test.user@fsadfklñ.com

I don't know, but shouldn't this be more like this:

objUser.put "userPrincipalName", "test.user@fsadfklñ.com"

--
torgeir


Joe Richards [MVP]

unread,
Jul 29, 2002, 8:18:18 AM7/29/02
to
Try setting the password AFTER you create the account with the setinfo.

--
Joe Richards
www.joeware.net
---

"José Juan Rodríguez" <jrodr...@gpm.es> wrote in message

news:evQBJ4uNCHA.1856@tkmsftngp12...

askme

unread,
Jul 29, 2002, 3:26:36 PM7/29/02
to
Yes, there must be a setinfo before you attempt password change, then with
password change you do another setinfo.
This is why it wont run.


Set objContainer = GetObject(LDAP://OU=lfkjaskl,DC=fsadfklñ,DC=com)
> > Set objUser = objContainer.Create("user","cn=testuser1")
> > objUser.put "sAMAccountName", "testuser"
> > objUser.put "userPrincipalName", test.user@fsadfklñ.com

> > objUser.SetInfo

> > objUser.put "userPassword", "password"
> > objUser.SetInfo


"Joe Richards [MVP]" <humorexpr

e...@hotmail.com> wrote in message news:e6zKpnvNCHA.2520@tkmsftngp08...

Joe Richards [MVP]

unread,
Jul 29, 2002, 6:56:30 PM7/29/02
to
If you use setpassword method you shouldn't have to do a setinfo. Though you
will want to do a setinfo to correct the useraccount flags after the account
is created.

--
Joe Richards
www.joeware.net
---

<askme> wrote in message news:#w8FjXzNCHA.944@tkmsftngp10...

0 new messages