New User Powershell Script Cannot Run Dirsync

jbooze 61 Reputation points
2022-10-14T20:42:49.807+00:00

Hello,  
When we run a Powershell script to enter new users we can the attached error when it gets to the run dirsync command. I have this script on my computer and it runs fine, but when other users run a copy of the same script they get this error. I have compared permissions and researched online, bit cannot get it to work for them. We have a server dedicated to running dirsync and the users can connect to it, but access is denied when they run the script?  
Thank you.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 123.7K Reputation points MVP Volunteer Moderator
    2022-10-15T06:27:37.66+00:00

    Mind posting the actual script, we're not fortune tellers here :)

    Without knowing what exactly you're trying to run, my best guess is that you have not added the current user as a member of the ADSyncOperators group. Here's an article detailing what each group is used for: https://learn.microsoft.com/en-us/archive/blogs/iamsupport/support-info-azure-ad-connect-sync-security-groups


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.