Set up Active Directory user and group import
If you carry out the steps in the following, you'll get these features:
-
A sync. service user in Active Directory (AD)
-
A Zylinc solution that can use the sync. service user, to import AD users, and AD groups
-
Imported user pictures from the AD thumbnail or JPEG fields
- An AD group to control which users will use Zylinc licenses and be visible in Zylinc


If you have empty groups in Active Directory, the Zylinc solution ignores them by design. That means that such empty groups will be missing in the Zylinc Administration Portal and in the Zylinc clients.
To make a missing group visible, add at least one user to the group. That user must be visible to the Zylinc solution, i.e. a member of the group that you use to make users visible.

- Active Directory itself may have a delay before all data is replicated to all servers. A typical value for that delay is 900 seconds (15 minutes)
- Zylinc Directory Server service runs with a default interval of 5000 seconds (83 minutes), so a new user may exist for up to 83 minutes before the rest of the Zylinc solution can see that user.
- Zylinc Client Manager caches the list of users for up to 6000 seconds (100 minutes)
- ZyDesk and Administration Portal loads the list of users when you log in, and then caches that list in memory until the next time that you log in.
All in all, there can be a delay of up to 15+83+100=198 minutes (3 hours and 18 minutes) before new users will work, and before changes to the directory become available.
After that delay, you'll need to log out of ZyDesk or the Administration Portal, and then log in again, to load the new users or view changes.

As an administrator, you can do the following to make changes to AD take immediate effect in the Zylinc solution:
-
In the Administration Portal menu, select NETWORK > Directory Settings, and click Reinitialize
-
Clear Client Manager cache
-
Open the following URL in a browser: https://<Zylinc Windows Application Server>:8443/ClientManager/
Example: https://WinAppServer:8443/ClientManager
-
Ignore the security warning about the certificate, and continue to the website
-
Click Snapshot
-
Log in as: User name:adminPassword: the password for Windows Tomcat 8080 user admin
-
Click Reload Settings
-
-
Log out of ZyDesk or the Administration Portal, and then log in again.


Make sure your environment was installed as described in Install a Zylinc solution from scratch

Create the following groups, users, and memberships in AD.
A PowerShell script for all this is available in the following.
-
Create a global group ZylincVisible with the description: Members of this group are visible to Zylinc client software
-
Create another global group ZylincTestQueue1000 with the description: Members of this group will receive calls from Zylinc queue TestQueue1000
-
Create a user ZylincAgent1
- Description: A test user who can be used to log in to the Zylinc solution as an agent and receive calls from a queue
- Password: Password1 (change it to a real password)
- Password never expires
- User is enabled
- E-mail address: ZylincAgent1@<domain DNS suffix>
-
Create a user ZylincSyncSVC
- Description: Service account user that the Zylinc solution uses to synchronize from Active Directory
- Password: Password1 (change it to a real password)
- Password never expires
- User is enabled
-
Add the user ZylincAgent1 as a member of the group ZylincTestQueue1000
- Add the user ZylincAgent1 as a member of the group ZylincVisible
You can use the following script to do all that:
- Log in to a domain controller as a domain administrator, and start PowerShell.
-
Make a copy of the following PowerShell code, and then right-click inside the PowerShell window. This will effectively paste and run the code in PowerShell.
Remember to search for Password1 and replace it with real passwords before you run the script.
#
New-ADGroup -Name "ZylincVisible" -GroupScope Global -Description "Members of this group are visible to Zylinc client software"
New-ADGroup -Name "ZylincTestQueue1000" -GroupScope Global -Description "Members of this group will receive calls from Zylinc queue TestQueue1000"
New-ADUser ZylincAgent1 -DisplayName "ZylincAgent1" -SAMAccountName ZylincAgent1 -EmailAddress "ZylincAgent1@$([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name)" -UserPrincipalName "ZylincAgent1@$([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name)" -AccountPassword (ConvertTo-SecureString -AsPlainText "Password1" -Force) -PasswordNeverExpires $true -Enabled $true -Description "A test user that can be used to log in to the Zylinc solution as an agent and receive calls from a queue"
New-ADUser ZylincSyncSVC -DisplayName "ZylincSyncSVC" -SAMAccountName ZylincSyncSVC -UserPrincipalName "ZylincSyncSVC@$([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name)" -AccountPassword (ConvertTo-SecureString -AsPlainText "Password1" -Force) -PasswordNeverExpires $true -Enabled $true -Description "Service account user, that the Zylinc solution uses to synchronize from Active Directory"
Add-ADGroupMember "ZylincTestQueue1000" ZylincAgent1
Add-ADGroupMember "ZylincVisible" ZylincAgent1
#

-
In the Administration Portal menu, select INSTALL > Portal Configuration
-
Select Directory Sync, and click Save
-
In the Administration Portal menu, select NETWORK > Directory Settings
-
In Server Address, enter the hostname or IP address of the Zylinc Windows Application Server.
-
In Port, enter 35035
-
Select Enable LDAP Search
-
In Picture import, Priority, add AD,Jpeg and AD Thumbnail to Selected Sources
-
Use the up and down arrow icons to move AD Jpeg to the top of the list, and AD Thumbnail to second position.
-
Click Save

- In the Deployment Manager menu, select Deployment > Installation
- In Installers, select DirectoryServer
- Click Install Applications
- In the Deployment Manager menu, select Deployment > Windows Services
- Click Refresh Services
- Start Directory Server

-
In the Administration Portal menu, select NETWORK > Directory Settings
-
Click Add new Domain
-
Select Expand members
-
In Domain name, enter a name to identify the domain. Example: domain.local
-
In Server, enter the hostname or IP address of a domain controller. Example: dc01
-
In Port, enter 389
-
In User, enter user login name for the sync. service user in the format commonly known as User Principal Name (UPN). A User Principal Name (UPN) is the name of a system user in an e-mail address format, or in another format that looks like an e-mail address, where the suffix is the DNS name of the domain.
Example: ZylincSyncSVC@domain.local
To view a list of all users and their User Principal Names (UPN), log in to a domain controller as a domain admin, and copy/paste the following command in to PowerShell:
get-aduser -filter * |select DistinguishedName, SamAccountName, UserPrincipalName -
In Pwd, enter the password for the sync. service user
-
Click Save

- In the Administration Portal menu, select NETWORK > Directory Settings
- In LDAP Sync Settings, Configurations, click the Domain Name of the domain that you previously added
- Click Test
You should see a list of all groups in the domain.

If you see an error message, Error response received: Padding is invalid and cannot be removed., you can solve the error if you clear the password, save, and then re-enter the password:
- In the Administration Portal menu, select NETWORK > Directory Settings
- In LDAP Sync Settings, Configurations, click the Domain Name of the domain
- Delete the contents of the Pwd field, and click Save
- In LDAP Sync Settings, Configurations, click the Domain Name of the domain
- In the password field, Pwd, re-enter the password, and click Save
If you see an error message, Error connecting to Directory Server on WinAppServer/35035 - Connection refused (Connection refused), check that the Directory Server service is running, and that the server that hosts the Administration Portal (that's typically the Media Server) can reach port 35035 on the server that hosts the Directory Server (that's typically Zylinc Windows Application Server). Note that you need to restart the service if you change the address or port.

You'll start with a filter that simply imports all users: (CN=*). With this filter you can test that the import works.
- In the Administration Portal menu, select NETWORK > Directory Settings
- Click Add new Sync
- In Config name, enter a name for this configuration, for example all users
- In User Filter, enter CN=*
- Click Save

- In the Administration Portal menu, select NETWORK > Directory Settings
- In LDAP Sync Settings, Configurations, click the Sync. Name of the configuration that you previously created (the one that syncs all users with CN=*)
- In LDAP User Configuration Settings, click Test
You should see a list of all users in the domain.
If you see an error message and no users , refer to If you see an error message and no groups

-
In the Administration Portal menu, select NETWORK > Directory Settings
-
Click Add new Sync
-
In Config name, enter a name for the configuration, for example: members of ZylincVisible
-
Get DistinguishedName of the group ZylincVisible
Log in to a domain controller as a domain administrator, and copy/paste the following command into PowerShell:
get-adgroup -identity "ZylincVisible"| select DistinguishedName
Make a copy of the line that begins with CN=ZylincVisible.
Example:
CN=ZylincVisible,CN=Users,DC=domain,DC=local -
In User Filter, enter (memberOf:1.2.840.113556.1.4.1941:=<Distinguished Name of the group ZylincVisible>)
Example:
(memberOf:1.2.840.113556.1.4.1941:=CN=ZylincVisible,CN=Users,DC=domain,DC=local) -
Click Save

- In the Administration Portal menu, select NETWORK > Directory Settings
- In LDAP Sync Settings, Configurations, click the Sync. Name of the configuration you previously created that filters members of ZylincVisible
- In LDAP User Configuration Settings, click Test
You should see a list that only contains users who are members of ZylincVisible

To optimize the use of available licenses you only want the users from AD who are members of ZylincVisible. That's why you'll want to disable the other sync.
The fact that you'll disable the sync, rather than delete it, ensures that the test button will be available if you later want to inspect all users in the domain. With the test button, you'll be able to view information from Name, DN, and E-mail.
To disable the CN=* all users sync:
- In the Administration Portal menu, select NETWORK > Directory Settings
- In LDAP Sync Settings, Configurations, click the Sync. Name of the configuration that you previously created (the one that syncs all users with CN=*)
- Clear Enabled
- Click Save


- In the Administration Portal menu, select NETWORK > Directory Settings
- Click Reinitialize

-
Open the following URL in a browser: https://<Zylinc Windows Application Server>:8443/ClientManager/
Example: https://WinAppServer:8443/ClientManager
-
Ignore the security warning about the certificate, and continue to the website
-
Click Snapshot
-
Log in as: User name:adminPassword: the password for Windows Tomcat 8080 user admin
-
Click Reload Settings
The cache will also be cleared if you just restart the Windows service ZyTomcat1-8080-8443, but beware that this will disconnect all users.

- In the Administration Portal, click Logout
- Log in to the portal again
This will reload the Administration Portal cache of users and groups.

-
In the Administration Portal menu, select USERS > ZyDesk Users
You should see a list of all users who are members of the groups that were included in your import. It's OK if the users are shown in strikethrough font (that's just because they're not yet ZyDesk users).
-
In the Administration Portal menu, select NETWORK > Directory Settings
In CSV User import, Group Member-of, Available, you should see a list of non-empty groups that were included in your import.
Empty groups, or groups that appear empty to the Zylinc solution because the users were excluded by the user filter, will not be visible.

If you're a supporter or system consultant, you can do the following to check that the Directory Server service works as expected:
- In the Administration Portal menu, select NETWORK > Directory Settings, and click Reinitialize.
- Next to the Reinitialize button, you should see the message Directory successfully re-initialized!
- Locate the current version of the Directory Server log file, and open it in a text editor
- A line close to the bottom of the log file should contain a very recent date stamp and the text Directory Search Finished
- Another line close to the bottom of the log file should contain a very recent date stamp and the text AdDirectory. The same line should also contain three counters: Total identites: XX, Total groups: YY, Total Organization groups: ZZ.
- XX must be greater than zero. If you use groups, YY must also be greater than zero.
The following command carries out steps 3-5. To use the script, log in to the Zylinc Windows Application Server, press Windows+R on your keyboard, and then copy and paste the following command and click OK.
powershell Get-Content(dir C:\ProgramData\Zylinc\DirectoryServer -filter """"*log*.txt"""" -rec|group directory|foreach{@($_.group|sort {[datetime]$_.lastwritetime} -desc)[0].fullname}) -wait|where {$_ -match """"AdDirectory|Search Finished""""}
The command locates and opens the current version of the Directory Server log file, and sets up a filter so that you only see the lines mentioned in steps 4 and 5.
The window remains open and continues to update. If you click Reinitialize again (step 1), two new lines will be added to the bottom of the log pile, if the service appears to work as expected.
This is help for Zylinc version 6.0. To view Zylinc unified help for other versions, go here.
© 2021 Zylinc A/S • Disclaimer
Help version: 22 January 2021 13:21:22
Share this topic: