Active Directory Create user not working

Hi, so I’ve been trying to automate for one week the creation of users in Active Directory. The account I am using has Full Control over the parent OU of the OU we are working on.
I am able to update objects, read anything, however when it comes to creation of user, I keep getting this error:

Create User: An error has occurred: Exception has been thrown by the target of an invocation.
RemoteException wrapping UiPath.ActiveDirectoryDomainServices.Activities.ActiveDirectoryException: An error has occurred: Exception has been thrown by the target of an invocation. —> RemoteException wrapping System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> RemoteException wrapping System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

When running my process and after this failure, even tough the activity failed, the user is still getting created, however it is completely empty. None of the properties is updated (not getting enabled, password, first name …).

I found other posts with people suggesting to downgrade package to 1.3.1. but even that is not working. And now I am stuck, if anyone can please help!

@Bennis_Jad

Could you please show how are you passing the values to same?

Also, could you please try printing the values right before creating user to verify if values are there and not null.

Hi @sonaliaggarwal47 ,

As you can see, I am simply running it in a test file, with hardcoded values. And I am still getting the same error. It is being created as an empty user, with all attributes blank.

UiPath still giving same error as well

Hi @Bennis_Jad

if you try to use below activities to individually try to update values, what happens?

  1. get user status activity
  2. set user status
  3. update password

@Bennis_Jad

Or Try using update object properties to update the attribute values and see what happens?

You have not put anything into the “Properties” property of the activity:

Since even the creation with no properties is failing, I removed it to test without first. But both are failing with same error

Looks like there is some permission you need that you don’t have. I’d work with the AD team to figure it out. One way you could test is to log into a server with the robot account and try to create a user manually in the AD console.

another cause could be that some attributes are mandatory and need to be set at user creation time - can you please check with your IT and find out what are the mandatory properties that need to be set?