0 votes

Hi,

We would like to run an AD sync (Start-ADSyncSyncCycle -PolicyType Delta) after a new user is created.

Unfortunately, it looks like this script only works for servers that are on the same domain as the Adaxes service is installed. This is an issue because we are using Adaxes to manage multiple domains (MSP environment), and we would like the AD sync to run after creating a user in any of the domains.

What is the recommended way to achieve this?

Thanks, Max

by (40 points)

1 Answer

0 votes
by (292k points)

Hello Max,

Unfortunately, that is not something we can assist you with as it is a networking question not related to Adaxes. Using the command executed in the script is the only way. As such, you just need to find a way to connect to the corresponding server in your script.

0

Here is how we run delta sync as a PS command in adaxes. We "remotely" run it on any domain controller server. Your adaxes server must have visability to domain contoller of course.

We have it run after user creation and have it as a manual push button action in the web home page for my techs. We had to take it off user modify, because when we would export CSV info nightly to our users it would spam the delta sync and MS would block us.

$dirsyncServer = "srv-001.ourdomain.local" # TODO: modify me

Invoke-Command -ComputerName $dirsyncServer -ErrorAction Stop -ScriptBlock {
    Import-Module "C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\ADSync.psd1"

    Start-ADSyncSyncCycle -PolicyType Delta
}

Related questions

0 votes
1 answer

Hi after the user acount is created in Active Directory I need the business rule to pause for 30mins for the azure sync to take place before the rule can continue to add the 365 license.

asked May 24 by johanpr (120 points)
0 votes
1 answer

Using this built in function: There is no option to change the domain on the user account, however this is not the domain we use for UPN. However after creating a user, you can change it but trying to avoid going back into the object.

asked Apr 14, 2023 by mightycabal (1.0k points)
0 votes
1 answer

Will it use 1 license for an Active Directory user and his azure account or 2 licenses?

asked Nov 7, 2023 by johanpr (120 points)
0 votes
1 answer

Hello, is there a way to automatically create a user after creating a user in a different domain? Let me explain: We have a Management Domain we own and a new ... be created automatically We got a adaxes service account in both domains. Thanks in advance!

asked May 14, 2019 by Redfruit (100 points)
0 votes
0 answers

Before Deactivation of an Account on the Webinterface our Help Desk need to change the AD User Description manually. Is it possible to force a manual change before deactivation ?

asked Feb 7, 2020 by lv01 (20 points)
3,569 questions
3,259 answers
8,275 comments
547,962 users