Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

error using Create User in Active Directory v2 spoke

Yolanda6
Tera Contributor

 

I am able to use many of the other actions within the scope without issue. But, when attempting to use Create User, I consistently get this error: 

 "Action Status": {
        "code": 1,
        "message": "Error:  Access is denied (Process Automation.bd107beb877455107701ed3e0ebb358d; line 30)"

I'm not clear as to which script's line 30 is causing a problem. 

 

 

2 REPLIES 2

Viraj Hudlikar
Tera Sage
Tera Sage

Hello @Yolanda6 

 

The core issue is authentication/authorization. The service account configured in your Active Directory Connection within ServiceNow likely lacks the necessary permissions (e.g., "Create User" rights) in Active Directory to provision new users, even though it has permissions for other actions (like read or update).

 

The log messages clearly show:

  1. "Action Status": 1, "message": "Error: Access is denied" (from the Action Status output).

  2. "AUTH_FAILURE: 'Authentication failure with the user...', SERVER_UNAVAILABLE: 'The RPC server...'" (from the Logs).

  3. "CANT_FIND_OBJECT: 'Cannot find an object with identity'" (This often happens when the service account can't find the required object, like the organizational unit (OU), or can't perform the action on it).

The fact that other actions work means your MID Server is up and running, and the basic Connection & Credential setup is valid. The problem is specific to the permissions needed for Create User as

the ability to read a user (e.g., with a Get User action) is a very different permission level than the ability to create a new object (user) in a specific OU. Check with your AD team they might be help you with permission.

 

If my response has helped you, hit the helpful button, and if your concern is solved, do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.

Thank you. I was leaning towards the same conclusion but wanted a 2nd opinion.