Extensions/AADConnector.psm1

#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
#-------------------------------------------------------------------------

$ErrorActionPreference = "Stop"

$paramsRegKey = 'HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters\'
if (Test-Path $paramsRegKey)
{
  $installationDirectory = (Get-ItemProperty $paramsRegKey -Name Path).Path
  Import-Module "$installationDirectory\Bin\ADSync\ADSync.psd1"
  Add-Type -Path "$installationDirectory\Bin\Assemblies\Microsoft.MetadirectoryServicesEx.dll"
  Add-Type -Path "$installationDirectory\Bin\Microsoft.MetadirectoryServices.PasswordHashSynchronization.Types.dll"
  Add-Type -Path "$installationDirectory\Extensions\Microsoft.Azure.ActiveDirectory.Connector.dll"
}
else 
{
  Write-Warning -Message "AADConnect installation was not found. Using current directory. Some functionality may be unavailable."
  Add-Type -Path "$PSScriptRoot\Microsoft.MetadirectoryServicesEx.dll"
  Add-Type -Path "$PSScriptRoot\Microsoft.MetadirectoryServices.PasswordHashSynchronization.Types.dll"
  Add-Type -Path "$PSScriptRoot\Microsoft.Azure.ActiveDirectory.Connector.dll"
}

function Get-ADSyncAADConnectorImportApiVersion
{
  $paramRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters"
  $paramRegName = "AadConnectorImportApiVersion"

  $version = (Get-ItemProperty -Path $paramRegKey | Select $paramRegName).$paramRegName
  if (-not $version)
  {
    $version = 2
  }

  Write-Output $version
}

function Get-ADSyncAADConnectorExportApiVersion
{
  $aad = Get-ADSyncConnector -Identifier b891884f-051e-4a83-95af-2544101c9083
  $aadRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters\PerMAInstance\" + $aad.Name
  $aadRegName = "EnableNonExistentObjectReferenceExportFiltering"
  $paramRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters"
  $paramRegName = "AadConnectorExportApiVersion"

  $exportType = $aad.ExtensionConfiguration.ExportType
  $enableNonExistentObjectReferenceExportFiltering = 1
  if (Test-Path -Path $aadRegKey)
  {
    $enableNonExistentObjectReferenceExportFiltering = (Get-ItemProperty -Path $aadRegKey | Select $aadRegName).$aadRegName
    if ([string]::IsNullOrEmpty($enableNonExistentObjectReferenceExportFiltering))
    {
      $enableNonExistentObjectReferenceExportFiltering = 1
    }
  }
  $version = (Get-ItemProperty -Path $paramRegKey | Select $paramRegName).$paramRegName
  if (-not $version)
  {
    $version = 2
  }

  if ($version -eq 1)
  {
    if ($exportType -ne 2 -or $enableNonExistentObjectReferenceExportFiltering -ne 0)
    {
      Write-Error "Version mismatch in Registry and AAD Connector. Run Set-ADSyncAADConnectorExportApiVersion to fix the issue"
      return
    }
  }
  elseif ($version -eq 2)
  {
    if ($exportType -ne 5 -or $enableNonExistentObjectReferenceExportFiltering -ne 1)
    {
      Write-Error "Version mismatch in Registry and AAD Connector. Run Set-ADSyncAADConnectorExportApiVersion to fix the issue"
      return
    }
  }
  else
  {
    Write-Error "unknown version $version"
    return
  }

  Write-Output $version
}

function Set-ADSyncAADConnectorImportApiVersion 
{
  Param
  (
    [Parameter(Mandatory=$true)]
    [int] $version
  )

  $regKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters"
  $regName = "AadConnectorImportApiVersion"

  if (($version -ne 1) -and ($version -ne 2))
  {
    Write-Error "unknown version $version"
  }

  Set-ItemProperty -path $regKey -name $regName -value $version

  Write-Output $version
}

function Set-ADSyncAADConnectorExportApiVersion
{
  Param
  (
    [Parameter(Mandatory=$true)]
    [int] $version
  )

  $paramRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters"
  $regName = "AadConnectorExportApiVersion"
  $exportType = $null;
  $enableNonExistentObjectReferenceExportFiltering = 1;

  if ($version -eq 1)
  {
    $exportType = 2 
    $enableNonExistentObjectReferenceExportFiltering = 0
  }
  elseif ($version -eq 2)
  {   
    $exportType = 5
    $enableNonExistentObjectReferenceExportFiltering = 1
  }
  else
  {
    Write-Error "unknown version $version"
  }

  Set-ItemProperty -path $paramRegKey -name $regName -value $version
  $aad = Get-ADSyncConnector -Identifier b891884f-051e-4a83-95af-2544101c9083

  $perMaInstanceRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters\PerMAInstance\"
  if (-not (Test-Path -Path $perMaInstanceRegKey))
  {
    New-Item -Path $perMaInstanceRegKey |  Out-Null
  }
  $aadRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters\PerMAInstance\" + $aad.Name
  if (-not (Test-Path -Path $aadRegKey))
  {
    New-Item -Path $aadRegKey |  Out-Null
  }
  Set-ItemProperty -Path $aadRegKey -Name "EnableNonExistentObjectReferenceExportFiltering" -Value $enableNonExistentObjectReferenceExportFiltering

  $aad.ExtensionConfiguration.ExportType = $exportType
  $aad = Add-ADSyncConnector -Connector $aad

  Write-Output $version
}

function ConvertTo-ADSyncSourceAnchor
{
  Param
  (
    [Parameter(Mandatory=$true)]
    [string] $dn
  )

  $result = [Microsoft.Online.DirSync.Extension.Utilities.DNEncoding]::SafeRdnToString($dn);
  Write-Output $result
}

function ConvertTo-ADSyncAadDistinguishedName
{
  Param
  (
    [Parameter(Mandatory=$true)]
    [string] $sourceAnchor
  )

  $result = [Microsoft.Online.DirSync.Extension.Utilities.DNEncoding]::StringToSafeRdn($sourceAnchor);
  Write-Output $result
}

function ConvertTo-ADSyncCloudAnchor
{
  Param
  (
    [Parameter(Mandatory=$true)]
    [string] $encodedB64Anchor
  )
  $encodedRawAnchor =  [System.Convert]::FromBase64String($encodedB64Anchor);
  $rawAnchor = $encodedRawAnchor[4..($encodedRawAnchor.Length - 3)]
  $cloudAnchor = [System.Text.Encoding]::Unicode.GetString($rawAnchor)
  Write-Output $cloudAnchor
}

function Set-ADSyncMaxImportRefetchSize
{
  Param
  (
    [Parameter(Mandatory=$true)]
    [int] $size
  )

  $paramRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters"
  $regName = "MaxImportRefetchSize"

  Set-ItemProperty -path $paramRegKey -name $regName -value $size

  Write-Output $size
}

function Enable-ADSyncAADConnectorReferenceObsoletion
{
  $aadConnector = Get-ADSyncConnector -Identifier b891884f-051e-4a83-95af-2544101c9083

  $perMaInstanceRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters\PerMAInstance\"
  if (-not (Test-Path -Path $perMaInstanceRegKey))
  {
    New-Item -Path $perMaInstanceRegKey |  Out-Null
  }
  $aadConnectorRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters\PerMAInstance\" + $aadConnector.Name
  if (-not (Test-Path -Path $aadConnectorRegKey))
  {
    New-Item -Path $aadConnectorRegKey |  Out-Null
  }
  Set-ItemProperty -Path $aadConnectorRegKey -Name "EnableReferenceObsoletion" -Value 1

  Write-Output $true
}

function Disable-ADSyncAADConnectorReferenceObsoletion
{
  $aadConnector = Get-ADSyncConnector -Identifier b891884f-051e-4a83-95af-2544101c9083

  $perMaInstanceRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters\PerMAInstance\"
  if (-not (Test-Path -Path $perMaInstanceRegKey))
  {
    New-Item -Path $perMaInstanceRegKey |  Out-Null
  }
  $aadConnectorRegKey = "HKLM:\SYSTEM\CurrentControlSet\Services\ADSync\Parameters\PerMAInstance\" + $aadConnector.Name
  if (-not (Test-Path -Path $aadConnectorRegKey))
  {
    New-Item -Path $aadConnectorRegKey |  Out-Null
  }
  Set-ItemProperty -Path $aadConnectorRegKey -Name "EnableReferenceObsoletion" -Value 0

  Write-Output $true
}

#
# Sample usage:
# Full import: Get-ADSyncAadDirectoryChanges -creds $creds -version 2
#
function Get-ADSyncAadDirectoryChanges
{
  Param
  (
    [Parameter(Mandatory=$true)]
    [PSCredential] $creds,

    [Parameter(Mandatory=$false)]
    [byte[]] $watermark,

    [Parameter(Mandatory=$false)]
    [int] $version = 1,

    [Parameter(Mandatory=$false)]
    [string[]] $objectClassFilter
  )

  $enumerator = `
    [Microsoft.Azure.ActiveDirectory.Connector.Diagnostics.DiagnosticsFactory]::CreateChangeEnumerator( `
        $creds.UserName, `
        $creds.Password, 
        $objectClassFilter, `
        $watermark, `
        ($watermark -eq $null), `
        $version)

  try {
      while ($true) {
        $res = $enumerator.EnumerateNextBatch()
        Write-Output $res
        if (-not $res.AadBatch.MoreToRead) {
            break;
        }
    }
  }
  finally {
    $enumerator.Dispose()
  }
}

#
# Sample usage:
# Collect AAD user object DNs to delete in file userDNs.txt and run:
# Remove-ADSyncAadObjects -creds $creds -entries $( type .\userDNs.txt | ForEach-Object { [Microsoft.Azure.ActiveDirectory.Connector.Diagnostics.DeletionEntry]::FromDistinguishedName("user", $_) } )
#
function Remove-ADSyncAadObjects
{
  Param
  (
    [Parameter(Mandatory=$true)]
    [PSCredential] $creds,

    [Parameter(Mandatory=$true)]
    [Microsoft.Azure.ActiveDirectory.Connector.Diagnostics.DeletionEntry[]] $entries
  )

  $len = $entries.Count
  $entriesProcessed = 0
  $batchSize = 10

  $exporter = `
    [Microsoft.Azure.ActiveDirectory.Connector.Diagnostics.DiagnosticsFactory]::CreateDirectoryChangeExporter( `
      $creds.UserName, `
      $creds.Password)

  try {
    while ($entriesProcessed -lt $len) {
      $nextBatch = $entries | Select-Object -First $batchSize
      $entries = $entries | Select-Object -Skip $batchSize

      $results = $exporter.ExportDeletions([Microsoft.Azure.ActiveDirectory.Connector.Diagnostics.DeletionEntry[]]$nextBatch)
      Write-Output $results
  
      $entriesProcessed += $nextBatch.Count
    }
  } finally {
    $exporter.Dispose()
  }
}

# SIG # Begin signature block
# MIInogYJKoZIhvcNAQcCoIInkzCCJ48CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBnSNOH//dxFJEH
# 2xhnTU7oLyyJAofe9EQ2s8CBSTa1HKCCDYIwggY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