Last post Sep 09, 2010 02:18 PM by bizzum
Sep 09, 2010 09:47 AM|bizzum|LINK
I have an old COM+ object that we've used to create AD user accounts with information from our HR system. This process has been broken since a recent upgrade, so I'm attempting to modify the object to point to a new DC and a new inforamtion store during
mailbox creation. After modifying the code I am unable to get an account to be crated and the following error appears:
error '8007202f' Automation error A constraint violation occurred
I am not a developer and I know that this is a long shot but if anyone has any insight into if this is an AD issue or one with VB 6, any help at all would be greatly appreciated. I think this is the relevent code but again, I'm an admin not a developer:
thenewuser.AccountDisabled = False
Set objMailbox = thenewuser
objMailbox.CreateMailbox "LDAP://MyDCCN=Mailbox Store (MyExchServer),CN=First Storage Group,CN=InformationStore,CN=MARLEY,CN=Servers,CN=MyStuff,CN=Administrative Groups,CN=MyStuff,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=MyDomain,DC=com"
Thanks in advance for any help.
Sep 09, 2010 10:14 AM|qwe123kids|LINK
have u seen the link mention below..
Sep 09, 2010 10:53 AM|bizzum|LINK
Thanks so much for the help. I've attempted to apply the VB code from the article and am now receiving this error:
error '800a01a8' Object Required
Maybe I messed up on the syntax or put the code in th wrong spot? This is how I worked that snippet in:
Const ADS_OPTION_SECURITY_MASK = 3
Const ADS_SECURITY_INFO_DACL = 4
Dim domain As IADsContainer
Set domain = GetObject("LDAP://OU=New Users,DC=Company,DC=com")
Set oSD = domain.Get("ntSecurityDescriptor")
domain.Put "ntsecuritydescriptor", oSD
domain.SetOption ADS_OPTION_SECURITY_MASK, ADS_SECURITY_INFO_DACL
Dim thenewuser As IADsUser
recip = "CN=" & common_name
Set thenewuser = domain.Create("user", recip)
thenewuser.samAccountName = Customer_ID
thenewuser.userPrincipalName = Customer_ID
Sep 09, 2010 02:18 PM|bizzum|LINK
I realized that I had domain mispelled and I removed the wscript.echo "done".
Back to the original error.
Not sure where to go from here. Am I even close to right on the code or am I missing something?