Error: Access denied. Script returned status 3 using account local MID server service credential.

MDAQUIBK
Tera Contributor

Hello Everyone,

I am trying to use the “Add User to Group” orchestration action. When I run this action, I encounter the following errors:

  • IPaaSActionProbe | Access denied. Script returned status 3 using the local MID Server service account.
    Timestamp: 2026-01-07 13:08:53

  • Error: Failed while executing ActionAddUserToADGroup.ps1 (Access denied).
    Timestamp: 2026-01-07 13:08:53

  • Error: Access denied. Script returned status 3 using the local MID Server service account.

Please help !

Please find the screenshot for reference:

MDAQUIBK_0-1767794800935.png

 

1 REPLY 1

pavani_paluri
Tera Guru

Hi @MDAQUIBK ,


You’re trying to run the “Add User to Group” action in ServiceNow. It uses a PowerShell script to talk to Active Directory. Right now, it’s running with the MID Server’s local account which doesn’t have permission in Active Directory to add people to groups. So the script fails and says Access denied.

 

Use an account that has rights in Active Directory. Create or pick a service account in AD that can add/remove users from groups.

Tell ServiceNow about that account. Go into ServiceNow → Orchestration → Credentials. Add the AD account details there.
Map the account to your domain controller, In ServiceNow → Credential Affinity, link that AD account to the server where you’re running the action.
This makes sure the action uses the AD account instead of the MID Server’s local account.
Re‑run the action, now the script will run with the right permissions, and the “Access denied” error should go away.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P