Content:
Overview
It often happens that the user's properties are highly dependent on its organizational unit. And when creating a new user or modifying a user's properties in Web Interface it would be very convenient to populate the default attribute values such as Department, Office, etc depending on the OU. To solve this problem Cayosoft provides a new feature called Dynamic Attribute Mapping.
Prepare a data source file
What should contain a source file?
DynamicAttribute Mapping requires a CSV data file with a comma or semi-colon separator.
When a user object parent OU matches the value specified in the first column, the subsequent columns in the text file are used to fill attribute fields on the form that are defined by the remaining column names.
So, the text file’s first column should be named OU and must contain the DN of the Organizational Units associated with the data in the other columns. And the rest of the column in the file must contain attributes that will be populated on the Web Interface.
If the attribute value is empty in the file it will be possible to populate it on the form manually. Column names may not be equal to LDAP attribute names in Active Directory, you may use attribute mapping to link file columns to specific attribute names.
File example
The file in our example contains 2 different OUs with 4 Active Directory attributes specified. The second line in the file has the last columns empty, so these values can be entered manually on the form.
OU;OfficeName;Department;extensionAttribute1;extensionAttribute2
"OU=1,DC=milkyway,DC=omut,DC=info";"Atlanta";"Sales";"ext attribute1 OU-1";"ext attribute2 OU-1"
"OU=2,DC=milkyway,DC=omut,DC=info";"Columbus";"Marketing";"";""
Configure web actions
Setup Other Attributes on the action
If you want to use any custom attributes during new user creation you need to set up Other Attributes section on the New User action first:
-
Open Cayosoft Administrator Console and navigate to New User Web Action
-
Expand Other Attributes section
-
Set Other Attribute 1 as extensionAttribute1
-
Set Other Attribute 2 as extensionAttribute2
-
Click Save Changes
Note: if you want to be able to view and modify the same custom attributes on the User Properties form, you need to repeat these steps on HOME > CONFIGURATION > Web Interface > Web Actions > Active Directory > Properties (user properties) action.
Customize Other Attributes labels
If you want to customize labels for these attributes you need to use Attribute Policy:
-
Navigate to Attribute Policies
-
Click Add Attribute Policy at the top right
-
Enter a name for the New policy, for example, Other Attributes Labels
-
Expand the Policy Details of the new policy
-
Ensure that the radio button Policies Applied to everyone selected.
-
Click Add scope at the bottom right of the Policy Scope section
-
In Specify Policy Scope dialog do the following:
-
Select the Active Directory admin unit in the first column
(you can select any other AD units if needed)
-
Select the AD Users Web Query in the second column
Note 1: You can select additional web queries if needed like, AD User Templates, AD Users (Inactive), or AD Users (Locked out)
-
Select New User in the third column
Note 2: you can also select Properties to customize labels for the same attributes on the User Properties form
-
Click OK
-
-
Click the Scope in the policy to select it
-
In the Attribute policy settings section, select Other Attribute 1 (you can use search to find it)
-
Click Edit Policy
-
Select the checkbox near the Override label field set it to Extension Attribute 1 (or any text you want to be displayed on the form), and click OK
-
Perform the same actions with Other Attribute 2
-
Click Save Changes
Setup DynamicAttribute Mapping
After preparing a file and customizing the New User action with extension attributes you need to configure the New User web action to set up dynamic attribute mapping.
Note: It is important that all column names match the names of the attributes in Web Action. If column names do not exactly equal attribute names in the action or you are using Other Attributes you need to configure dynamic attribute column mapping in New User and Properties actions.
-
Open Cayosoft Administrator Console and navigate to New User Web Action
-
Expand the Dynamic Attribute Mapping section
-
Click the [...] button near 'Data source' and select the prepared CSV file
-
Select the separator used in the file (in our example it is Semi-colon separated ;)
-
Set in Column Name > Attribute mapping (optional): OfficeName>Office,Department,extensionAttribute1>CustomAttr1,extensionAttribute2>CustomAttr2
Note: there is no such property 'OfficeName' on the New User form, so we mapped it to 'Office': OfficeName>Office
Note 2: 'Department' exactly matches to existing Department property on web action so we use it as is
Note 3: if you are using Other Attributes you must map it to CustomAttrN, where N is a number of other attributes used for this property in the Other Attribute section: extensionAttribute1>CustomAttr1
-
Click Save Changes
Results
Let's see how the last page on the New User form looks if we are creating a user in OU 1 (first line in our CSV file):
And here you can see the same page on the form if we changed the organizational unit to OU 2 (second line in CSV with empty extensionAttributes):
Comments
0 comments
Please sign in to leave a comment.