This Polarion job synchronizes deleted (or marked as inactive) Azure AD users with Polarion
Important
Starting from version 3.0.0 only latest version of Polarion is supported.
Right now it is Polarion 2410.
The latest version of the extension can be downloaded from the releases page and installed to Polarion instance without necessity to be compiled from the sources.
The extension should be copied to <polarion_home>/polarion/extensions/ch.sbb.polarion.extension.aad-synchronizer/eclipse/plugins and changes will take effect after Polarion restart.
Important
Don't forget to clear <polarion_home>/data/workspace/.config folder after extension installation/update to make it work properly.
For using this job you can go in the global Administration / Scheduler to run regularly like this:
<job id="aad_user_synchronization.job" cronExpression="0 0 0 * * ?" name="AAD Synchronization" scope="system">
<authenticationProviderId>oauth2</authenticationProviderId>
<groupPrefix>SOME_GROUP_PREFIX_</groupPrefix>
<whitelist>
<filter>^user\d{3}@example\.com$</filter>
<accounts>
<account>userAAA@example.com</account>
<account>userBBB@example.com</account>
</accounts>
</whitelist>
<blacklist>
<filter>^admin|guest|service$</filter>
<accounts>
<account>testadmin@example.com</account>
<account>root@example.com</account>
</accounts>
</blacklist>
<dryRun>true</dryRun>
<checkLastSynchronization>false</checkLastSynchronization>
</job>This configuration defines the parameters for a job that synchronizes users from Azure Active Directory (AAD) to the Polarion.
authenticationProviderId): Authentication Provider from authentication.xml to obtain authentication tokens for Azure Graph API and field mappings.Extension uses tokenUrl, clientId, clientSecret, scope and mapping for connection to MS Graph API.
Example of authentication.xml:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<authentication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://polarion.com/PolarionAuthentication"
xsi:schemaLocation="http://polarion.com/PolarionAuthentication http://localhost/polarion/authentication.xsd">
<password default="true"/>
<oauth2 id="oauth2">
<nonce/>
<view>
<text>Single sign-on</text>
</view>
<authorizeUrl>https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize</authorizeUrl>
<tokenUrl>https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token</tokenUrl>
<clientId>client_id_goes_here</clientId>
<clientSecret userAccountVaultKey="polarion_vault_key_for_client_secret"/>
<scopes>
<scope>https://graph.microsoft.com/.default</scope>
</scopes>
<mapping>
<id>mailNickname</id>
<name>displayName</name>
<email>mail</email>
</mapping>
<autocreate>
<enabled>true</enabled>
<globalRoles>
<role>user</role>
</globalRoles>
</autocreate>
<groupsSynchronization>
<enabled>true</enabled>
<groupsMapping>
<namePath>roles</namePath>
</groupsMapping>
</groupsSynchronization>
</oauth2>
</authentication>groupPrefix): Limits synchronization to groups with a specified naming prefix.whitelist)filter): A regex pattern to include matching users.accounts): A predefined list of users to include in synchronization.If both filter and accounts are not specified, all found users will be synchronized.
If both filter and accounts are provided, the users that match the filter or are explicitly listed will be synchronized.
blacklist)filter): A regex pattern to exclude matching users.accounts): A predefined list of users to always exclude from synchronization.If both filter and accounts are not specified, no users will be excluded.
If both filter and accounts are provided, the users that match the filter or are explicitly listed will be excluded from synchronization.
dryRun): Enables simulation mode, where no actual changes are made.checkLastSynchronization): Determines whether to verify the timestamp of the last synchronization before execution.This extension provides REST API. OpenAPI Specification can be obtained here.