OOB "Add User to Group" AD activity - error msg "Exception from HRESULT: 0x80005000"

TylerTeter
Kilo Guru

The out-of-box "Add User to Group" AD activity, results in failure and it's giving an error msg of "Exception from HRESULT: 0x80005000". I've done some research on that error code, and similar ones for this activity and many think it's some kind of credential error. My question is, what kind of access must be configured for this activity to work? I didn't notice the documentation mention any needed additional access.

Add User to Group AD activity

Active Directory activity pack

There was a similar question asked on - AD orchestration authentication $cred is null but they only answered for the first half, how to do it via the PowerShell Activity. I'm hoping to use the OOB activity if possible however.

I'm planning on digging into this and debugging more on my end, but any help would be appreciated!

Thanks,

Tyler

find_real_file.png

1 ACCEPTED SOLUTION

Thanks Tyler!



After a bit more digging, I found the problem record in HI. Like you, we were on Geneva Patch 7 and this issue was fixed in Patch 8. The workaround was successful for me.



ServiceNow KB: PRB654096: AddUserToADGroup.ps1 PowerShell script is missing a parameter (KB0563575)



Thanks again for the help and pointing me in the right direction!



- Justin


View solution in original post

10 REPLIES 10

Thanks Tyler!



After a bit more digging, I found the problem record in HI. Like you, we were on Geneva Patch 7 and this issue was fixed in Patch 8. The workaround was successful for me.



ServiceNow KB: PRB654096: AddUserToADGroup.ps1 PowerShell script is missing a parameter (KB0563575)



Thanks again for the help and pointing me in the right direction!



- Justin


Great find! I'm marking that answer as correct . Great to know Patch 8 Solves the problem.



Glad you found the solution that was driving me insane!



Sincerely,


Tyler


salunkekomal199
Kilo Contributor

Hi



If you are using the out-of-box "Add User to Group" AD activity please check following



1) Mid Server Status - It should be Up


2) Mid Server Properties - Mid server name installed on client machine where AD is present


find_real_file.png



3) Please check whether user which you are adding in group is present in AD or not.


4) If user is not present you need to create it first and then add it to group.


5) I have used same activity & I was able to add user to group successfully.



PFB Screenshot.



find_real_file.png


Komal,



Thank you for your intended help. I did check all of the things in the above list. I also checked several others, permissioning, etc. Another big component of this is ensuring you have the AD PowerShell module enabled and credentialed properly on the MID Server. As I mentioned to someone else just now, I ended up using my own homemade powershell script which provided greater functionality to meet my requirements so I no longer need to use this activity.



I'm glad the Activity works for you. Just out of curiousity can you provide which version you ran it on?



Sincerely,


Tyler


dugarj
Kilo Contributor

Hi Tyler,



I am facing the same issue. We are running on Geneva patch 8 Hotfix 1. Can you help!



Getting the below error;


Authentication failure with the local MID server service credential. *** Failed to access target system. Please check credentials and firewall settings on the target system to ensure accessibility: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))Stack Trace: at System.Management.ManagementScope.Initialize()at System.Management.ManagementObjectSearcher.Initialize()at System.Management.ManagementObjectSearcher.Get()at Microsoft.PowerShell.Commands.GetWmiObjectCommand.BeginProcessing()at System.Management.Automation.Cmdlet.DoBeginProcessing()at System.Management.Automation.CommandProcessorBase.DoBegin()



Thanks in advance!!!



Jayshree !