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.

Failed while executing ActionCreateNewGroup.ps1 (Access denied)

SURAJ3
Giga Contributor

HI Team ,

 

I have PowerShell script stored on mid server to create  OU in Active Directory using AD spokes. i have 10 different domains in which this script has to be executed . i could get script successfully only in two domain and its getting failed in rest of the domains.(checked with access to user its same for all the domains)

Error:

5 REPLIES 5

Hi @Rahul Priyadars,

 

I am facing the same issue, I am able to create create users for 2 domains for failing for others, message showing "Access Denied". The strange part is I am able to write to those attributes by Power-shell command line but not from ServiceNow workflow activity. The same workflow is creating users perfecting in AD for 2 domains.

 

Error message coming up as :

Access is denied
HRESULT: [-2146233087]

 

Do you have any clue on this?

 

Thanks