ARSS creating new AD Users: Attribute Conflicts handling

Should be a standart user provisioning scenario, it works in my LAB but perhaps better conflicts handling ways exist and I "over-engineer" it? When building workflow to create new AD users I'm basically handling two conflicts: Name and SamAccountname.

1. Name: I'm handling it under "Rules to generate unique object name" screen with 2 rules 1) Name 2) Script to add PREFIX

$output = $null

$output = "DUP_ARSS_" + $srcObj["name"]

$output

2. SamAccountName: I'm doing it as Sync attribute rule where I query Target AD and add prefix if conflict on SamAccountName is found


$sam = $null

$output = $null

$objSearcher = $null

$ObjT = $null

 

$SDC = "DC1.Domain.com"

 

$sam = $srcObj["samAccountName"]

 

$objSearchRootSDC = [adsi]"LDAP://$SDC"

if ($($objSearchRootSDC.properties.distinguishedname) -eq $null)

{

            $output = $sam

} else

{

            #SAM Conflict check

            $objSearcher = New-Object System.DirectoryServices.DirectorySearcher

            $objSearcher.PageSize = 100

            $objSearcher.Filter = "(samAccountName=$sam)"

            $objSearcher.SearchRoot = $objSearchRootSDC

            #"distinguishedname" | %{[void]$objSearcher.PropertiesToLoad.Add($_)}

            $ObjT = $objSearcher.FindOne()

           

            if ($ObjT)

            {

                        $output = "DUP_ARSS_" + $sam

            } else

            {

                        $output = $sam

            }

}

 

$output

Parents
  • In my opinion, samaccountname conflicts are more easily handled by the built-in provisioning policies in Active Roles itself.

    Assumptions:

    1. Your Connections to AD in ARSS are via Active Roles (or at least the target needs to be for my idea to work)

    2. You have your own "staging OU" 

    Implementation:

    Configure a logon name policy rule in a provisioning policy linked to your staging OU that basically mimics what you are doing with your Name de-duping in ARSS.  You can do this codelessly as the rule wizard is very similar to what you have seen for your name de-duping.

Reply
  • In my opinion, samaccountname conflicts are more easily handled by the built-in provisioning policies in Active Roles itself.

    Assumptions:

    1. Your Connections to AD in ARSS are via Active Roles (or at least the target needs to be for my idea to work)

    2. You have your own "staging OU" 

    Implementation:

    Configure a logon name policy rule in a provisioning policy linked to your staging OU that basically mimics what you are doing with your Name de-duping in ARSS.  You can do this codelessly as the rule wizard is very similar to what you have seen for your name de-duping.

Children