How can we help?
{{docApp.searchError}}
{{product.name}}
Searching in {{docApp.searchFilterBySpecificBookTitle}}
{{docApp.searchResultFilteredItems.length}} results for: {{docApp.currentResultsSearchText}}
in {{docApp.searchFilterBySpecificBookTitle}}
Search results have been limited. There are a total of {{docApp.searchResponse.totalResultsAvailable}} matches.
You have an odd number of " characters in your search terms - each one needs closing with a matching " character!
-
{{resultItem.title}}
{{resultItem.url}}
{{docApp.libraryHomeViewProduct.title || docApp.libraryHomeViewProduct.id}}
{{docApp.libraryHomeViewProduct.description}}
{{group.title || group.id}}
{{group.description}}
Configuration
- Article
- Mon Nov 04 2024
- 9 minutes to read
- 1 contributors
Overview
The options and configuration of imports using this utility are saved in one or more JSON (JavaScript Object Notation) files in the folder where the utility executable resides.
We have provided a default configuration file in each of the downloadable archives: conf.json
. This can be used as a template from which to build your import configurations.
Tip
The utility will default to conf.json
if a configuration file is not specified as a command line argument
Example Configuration
{
"KeysafeKeyID": 0,
"ImportID": "UniqueImportID",
"AzureConf": {
"Search": "groups",
"UserFilter": "startswith(displayName,'Dave')",
"UserProperties": [
"businessPhones",
"employeeId",
"mailNickname",
"mail",
"givenName",
"surname",
"telephoneNumber",
"department",
"officeLocation",
"onPremisesExtensionAttributes"
],
"UsersByGroupID": [
{
"ObjectID": "Group Object ID",
"Name": "Group Object Name"
},
{
"ObjectID": "Second Group Object ID",
"Name": "Second Group Object Name"
}
]
},
"User": {
"Operation": "Both",
"HornbillUniqueColumn": "h_user_id",
"AccountMapping": {
"UserID": "{{.userPrincipalName}}",
"LoginID": "",
"EmployeeID": "",
"UserType": "basic",
"Name": "{{.givenName}} {{.surname}}",
"Password": "",
"FirstName": "{{.givenName}}",
"LastName": "{{.surname}}",
"JobTitle": "{{.onPremisesExtensionAttributes.extensionAttribute12}}",
"Site": "1",
"Phone": "{{index .businessPhones 0}}",
"Email": "{{.mail}}",
"Mobile": "{{.onPremisesExtensionAttributes.extensionAttribute4}}",
"AbsenceMessage": "",
"TimeZone": "",
"Language": "",
"DateTimeFormat": "",
"DateFormat": "",
"TimeFormat": "",
"CurrencySymbol": "",
"CountryCode": "",
"Enable2FA": "disabled",
"DisableDirectLogin": "false",
"DisableDirectLoginPasswordReset": "false",
"DisableDevicePairing": "false"
},
"ProfileMapping": {
"MiddleName": "",
"JobDescription": "",
"Qualifications": "",
"Interests": "",
"Expertise": "",
"Gender": "",
"Dob": "",
"Nationality": "",
"Religion": "",
"HomeTelephone": "{{.telephoneNumber}}",
"SocialNetworkA": "",
"SocialNetworkB": "",
"SocialNetworkC": "",
"SocialNetworkD": "",
"SocialNetworkE": "",
"SocialNetworkF": "",
"SocialNetworkG": "",
"SocialNetworkH": "",
"PersonalInterests": "",
"homeAddress": "",
"PersonalBlog": "",
"Attrib1": "",
"Attrib2": "",
"Attrib3": "",
"Attrib4": "",
"Attrib5": "",
"Attrib6": "",
"Attrib7": "",
"Attrib8": ""
},
"Type": {
"Action": "Both"
},
"Security": {
"Action": "Both"
},
"Status": {
"Action": "Both",
"Value": "active"
},
"Role": {
"Action": "Both",
"Roles": [
"Basic User Role"
]
},
"Manager": {
"Action": "Both",
"AzField": "userPrincipalName",
"HornbillUniqueColumn": "h_user_id"
},
"Image": {
"Action": "Both",
"UploadType": "AZURE",
"InsecureSkipVerify": false,
"ImageType": "png",
"ImageSize": "504",
"URI": "{{.id}}"
},
"Site": {
"Action": "Both",
"Value": "{{.officeLocation}}"
},
"Org": [
{
"Action": "Both",
"value": "{{.department}}",
"MemberOf": "",
"Options": {
"Type": 2,
"Membership": "member",
"TasksView": false,
"TasksAction": false,
"OnlyOneGroupAssignment": false,
"SetAsHomeOrganisation": false
}
}
],
"Actions": [
{
"Action": "Trim",
"Value": "{{.department}}",
"Output": "department"
},
{
"Action": "Replace",
"Value": "{{.mobile}}",
"Options": {
"replaceFrom": "0",
"replaceWith": "+44"
},
"Output": "phone"
},
{
"Action": "Regex",
"Value": "{{.telephoneNumber}}",
"Options": {
"regexValue": "([0-9])\\w+/g"
},
"Output": "areaCode"
}
]
}
}
Configuration Explanation
KeysafeKeyID
- Type:integer
- The ID of the KeySafe Key that contains your Azure authentication details. See the KeySafe section of the Authentication article for more information.ImportID
- Type:string
- A unique import ID to be associated with any run import jobs. This allows for different import configiurations (for example, imports from different Entra ID tenants) to be run concurrently.AzureConf
- Type:object
- The information that the utility needs to query Entra ID.Search
- Type:string
- Can beusers
orgroups
. SeeUserFilter
andUsersByGroupID
below.UserFilter
- Type:string
- Allows you to apply a filter against the list of users returned by Entra ID for processing, when theSearch
property, above, is set tousers
. See the Microsoft API documentation for more information.UserProperties
- Type:array
- A list of fields that the import requires from Entra ID. See the Microsoft API documentation on the $select keyword for more information.UsersByGroupID
- Type:array
- Contains a list of objects that contain Entra ID Group information. Users who are members of these Groups will be included in the import, when theSearch
property, above, is set togroups
.
User
- Type:object
- Contains all Entra ID to Hornbill mappings, and user configuration.Operation
- Type:string
- Can beCreate
,Update
, orBoth
. Import actions to perform on the discovered user records.HornbillUniqueColumn
- Type:string
- The ID of the column in Hornbill that contains the users unique ID to match imported user records from the Entra ID data source against. Can be one of the following values:h_user_id
- Identifies Hornbill users against Entra ID user field values that are defined inUser>AccountMapping>UserID
h_employee_id
- Identifies Hornbill users against Entra ID user field values that are defined inUser>AccountMapping>EmployeeID
h_login_id
- Identifies Hornbill users against Entra ID user field values that are defined inUser>AccountMapping>LoginID
h_email
- Identifies Hornbill users against Entra ID user field values that are defined inUser>AccountMapping>Email
h_mobile
- Identifies Hornbill users against Entra ID user field values that are defined inUser>AccountMapping>Mobile
AccountMapping
- Type:object
- Data mapping, in the format"fieldInHornbill": "data to insert"
. The data to insert can either be hard-coded strings, mapped from the source data using one or more Go templates, or a mixture of the two. Some specific examples:"UserType": "basic"
- All records will be created as Basic Users in Hornbill. See the Hornbill user documentation for more information."Password": ""
- if the Password data mapping is left empty, then the utility with generate a random password to create new users with. The generated passwords will obey the password policies defined on the target Hornbill instance."Site": "1"
- If set, see the comments below on SiteLookupTimeZone
- See the list of timezones supported by Hornbill for valid values.Language
- Language localization tags, ISO 629 in combination with ISO 3166, examples:en-GB
en-US
fr-FR
- etc…
DateTimeFormat
- See the list of supported DateTime formats for valid values.CountryCode
- ISO 3166 Alpha 2 two Character Country Code.
ProfileMapping
- Type:object
- Data mapping for user profile fields, in the format"fieldInHornbill": "data to insert"
. SeeAccountMapping
above for details.Type
- Type:object
- Contains a single propertyAction
, which can beCreate
,Update
, orBoth
. Import actions to perform on the Type field of the discovered user records.Security
- Type:object
- Contains a single propertyAction
, which can beCreate
,Update
, orBoth
. Import actions to perform on the Security fields of the discovered user records.Status
- Type:object
- Contains two properties, Import actions to perform on the Status of the discovered user records:Action
- Type:string
- Can beCreate
,Update
, orBoth
.Value
- Type:string
- The user account status. Can beactive
,suspended
, orarchived
.
Role
- Type:object
- Contains two properties, Import actions to perform on the Roles of the discovered user records:Action
- Type:string
- Can beCreate
,Update
, orBoth
.Roles
- Type:array
- A list of application or system roles that should be assigned to the users being imported.
Manager
- Type:object
- Contains three properties, Import actions to perform on the Manager field of the discovered user records:Action
- Type:string
- Can be:Create
,Update
, orBoth
- any of these (case-insensitve) can be used to activate manager association- Any other value will disable manager search & setting.
AzField
- Type:string
- The Entra ID field to identify the manager ID against.ClearIfNoManager
- Type:boolean
- Defaults tofalse
. Set totrue
to clear the Hornbill users manager field should the matched user no longer have a manager against their Entra ID user objectHornbillUniqueColumn
- Type:string
- The Hornbill field to identify the imported users’ manager ID against.
Image
- Type:object
- Contains several properties, Import actions to perform on profile images of the discovered user records:Action
- Type:string
- Can beCreate
,Update
, orBoth
.UploadType
- Type:string
- Can beURI
,URL
, orAZURE
, local (network) drive or HTTP(S) served imageInsecureSkipVerify
- Type:boolean
- Skip invalid certificate verification when importing imagesImageType
- Type:string
- Image type, can bepng
orjpg
ImageSize
- Type:integer
- The image size to return from Entra ID, one of 48/64/96/120/240/360/432/504/648. See the Microsoft documentation for more information and options. -URI
- Type:string
- The source mapping for the image
Site
- Type:object
- Contains two properties, Import actions to perform on the Location of the discovered user records:Action
- Type:string
- Can beCreate
,Update
, orBoth
.Value
- Type:string
- The source mapping of the Location.
Org
- Type:array
- An array of objects containing several properties of Organizational Unit/Group information to associate the imported user with:Action
- Type:string
- Can beCreate
,Update
, orBoth
.Value
- Type:string
- The mapped name of the Organizational Unit.MemberOf
- Type:string
- This field references the “memberOf” attribute of the user object in your Entra ID directory. When the distinction of a group is specified in this field, the utility will only allow the group association in Hornbill if the group DN exists in thememberOf
attribute of the user object being processed. i.e. only allow the Hornbill group association if the user object is a member of this directory group.Options
- Type:object
- A collection of properties to define membership settings of organizational group:Type
- Type:integer
- The numeric value for the group type:0
-general
1
-team
2
-department
3
-costcenter
4
-division
5
-company
6
-businessUnit
7
-directorate
8
-branch
9
-function
10
-board
11
-subsidiary
Membership
- Type:string
- The group membership role, can be one ofmember
,teamLeader
ormanager
.TasksView
- Type:boolean
- If set totrue
, then the imported users can view tasks assigned to this group (Typically only required for Groups of type “Team”).(Typically only required for Groups of type “Team”).TasksAction
- Type:boolean
- If set totrue
, then the user can action tasks assigned to this group.OnlyOneGroupAssignment
- Type:boolean
- When set totrue
, a user can only be associated with a single group of the specified type at any one time. So for example, if in the latest import the configuration was set to associate users to the Accounting department, the users would be associated with this new department and removed from any other department group that they were already associated with.SetAsHomeOrganisation
- Type:boolean
- Only used when the group type is Company (5). When set totrue
, the Company will be set as the users Home Organization.
Actions
- Type:array
- A list of transform actions that can be performed on mapped field values:Action
- Type:string
- One ofTrim
,Replace
orRegex
.Trim
- Trims whitespace characters from the beginning and end of the value.Replace
- Replaces part of a value string with another string.Regex
- Searches the value for content using a provided regular expression, and returns that value.
Options
- Type:object
- A collection of properties to control either theReplace
orRegex
actions:replaceFrom
- Type:string
- Used in theReplace
action. The old string that should be replaced.replaceWith
- Type:string
- Used in theReplace
action. The new string to replace the old string with.regexValue
- Type:string
- Used in theRegex
action. The regular expression to use to search the value.
- Version {{docApp.book.version}}
- Node {{docApp.node}} / {{docApp.build}}
In This Document