Issue
When you use Create AD Object activity and pass certain values on the ObjectData field such as SN (for surname) you get the following error on the ECC message:
<error>The specified directory service attribute or value does not exist.Stack Trace: at System.DirectoryServices.DirectoryEntry.CommitChanges()at CommitChanges(Object , Object[] )at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object target, Object[] arguments, MethodInformation methodInformation, Object[] originalArguments)</error>
Release
Microsoft Active Directory
Cause
Create AD Object only supports an Object with generic properties, Surname isn't one.
Resolution
You must remove the unsupported object from the ObjectData field.
A list of supported properties can be listed using the command: Get-ADObject -Properties * -Filter "samaccountname -like 'zervicenow'"
Example:
PS C:\Users\Administrator.SUPPORTLABAUTO> Get-ADObject -Properties * -Filter "samaccountname -like 'zervicenow'"
accountExpires : 9223372036854775807
CanonicalName : supportlabauto.service-now.com/Users/zervicenow
CN : zervicenow
codePage : 0
countryCode : 0
Created : 9/19/2018 7:29:37 AM
createTimeStamp : 9/19/2018 7:29:37 AM
Deleted :
Description :
DisplayName :
DistinguishedName : CN=zervicenow,CN=Users,DC=supportlabauto,DC=service-now,DC=com
dSCorePropagationData : {12/31/1600 4:00:00 PM}
givenName : MOZART
instanceType : 4
isDeleted :
LastKnownParent :
Modified : 9/19/2018 7:29:52 AM
modifyTimeStamp : 9/19/2018 7:29:52 AM
Name : zervicenow
nTSecurityDescriptor : System.DirectoryServices.ActiveDirectorySecurity
ObjectCategory : CN=Person,CN=Schema,CN=Configuration,DC=supportlabauto,DC=service-now,DC=com
ObjectClass : user
ObjectGUID : 6e8346ee-9ab5-45d1-a428-a1e7b0743900
objectSid : S-1-5-21-4064951249-3552310721-759615066-1400
primaryGroupID : 513
ProtectedFromAccidentalDeletion : False
pwdLastSet : 0
sAMAccountName : zervicenow
sAMAccountType : 805306368
sDRightsEffective : 15
street : Mr
userAccountControl : 546
uSNChanged : 4140968
uSNCreated : 4140968
whenChanged : 9/19/2018 7:29:52 AM
whenCreated : 9/19/2018 7:29:37 AM
Related Links
For complex AD operations, you must use the Run Powershell Activity.