PHP code example of itk-dev / azure-ad-delta-sync

1. Go to this page and download the library: Download itk-dev/azure-ad-delta-sync library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

itk-dev / azure-ad-delta-sync example snippets




use ItkDev\AzureAdDeltaSync\Handler\HandlerInterface;

class SomeHandler implements HandlerInterface
{
    public function collectUsersForDeletionList(): void
    {
        // Some start logic
    }

    public function removeUsersFromDeletionList(array $users): void
    {
        // Some user logic
    }

    public function commitDeletionList(): void
    {
        // Some commit logic
    }
}


use GuzzleHttp\Client;
use ItkDev\AzureAdDeltaSync\Controller;


$options = [
  'uri' => 'https://aarhus.../RetrieveProvisioningData/...', // System provisioning uri
  'security_key' => 'some_security_key', // Provisioning data security key
  'client_secret' => 'some_client_secret', // System provisioning client secret
];

$handler = new SomeHandler();

$client = new Client();
$controller = new Controller($client, $this->options);

$controller->run($handler);