PHPackages                             itk-dev/azure-ad-delta-sync-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. itk-dev/azure-ad-delta-sync-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

itk-dev/azure-ad-delta-sync-bundle
==================================

Symfony bundle that enables the Azure AD Delta Sync flow

1.0.0(4y ago)05MITPHPPHP ^7.4 || ^8.0

Since Sep 1Pushed 4y ago2 watchersCompare

[ Source](https://github.com/itk-dev/azure-ad-delta-sync-symfony)[ Packagist](https://packagist.org/packages/itk-dev/azure-ad-delta-sync-bundle)[ RSS](/packages/itk-dev-azure-ad-delta-sync-bundle/feed)WikiDiscussions develop Synced today

READMEChangelog (1)Dependencies (10)Versions (3)Used By (0)

Azure AD Delta Sync Symfony Bundle
==================================

[](#azure-ad-delta-sync-symfony-bundle)

Symfony bundle for Azure AD Delta Sync flow.

Installation
------------

[](#installation)

To install run

```
composer require itk-dev/azure-ad-delta-sync-bundle
```

Usage
-----

[](#usage)

Before being able to use the bundle, you must have your own `User` entity, `UserRepository` and database setup.

You will need to configure variables for Microsoft groups, the above mentioned `User` entity and cache pool:

### Variable configuration

[](#variable-configuration)

In `/config/packages` you need the following `itkdev_azure_ad_delta_sync.yaml` file:

```
itkdev_azure_ad_delta_sync:
  azure_ad_delta_sync_options:
    tenant_id: 'some_tenant_id'
    client_id: 'some_client_id'
    client_secret: 'some_client_secret'
    group_id: 'some_group_id'
  user_options:
    system_user_class: 'App\Entity\User'
    system_user_property: 'some_user_property'
    azure_ad_user_property: 'some_azure_ad_user_property'
  cache_options:
    cache_pool: 'cache.app'
```

Here the `azure_ad_user_property` should be a property on the Azure AD user that is equivalent to the `system_user_property`, as this is how we compare system users with Microsoft group users. For this reason the comparing property must also be unique.

### Listening to DeleteUserEvent

[](#listening-to-deleteuserevent)

The bundle dispatches a `DeleteUserEvent` containing a list of user properties (`system_user_property`) for potential removal. The using system should implement logic to ensure these users are not deleted unintentionally.

Therefore, the using system will need to implement an EventListener or EventSubscriber that listens to the `DeleteUserEvent`.

#### Example EventSubscriber

[](#example-eventsubscriber)

```
