Import SQL Data | Create AD Users rule
Rule description
This rule queries the specified SQL data source and provisions new user accounts according to the Action section settings.
When to use this rule
Use this rule when you need to perform bulk user account provisioning from HR/ERP/SIS system into Active Directory.
You can extend provisioning to other systems like Microsoft 365, by combining this rule with other automation rules or using the pre-configured runbooks. For more information, please see the Rules and runbooks article.
It is possible to specify values for any user attribute, including those required for Exchange Server and Microsoft 365.
The data source can be either an SQL Table or View. The SQL table should contain the following columns:
FirstName
LastName
Description
EmailAddress
Video Tutorial
In this video guide, you will learn how to use the Import SQL Data | Create AD Users rule separately and in the runbook.
Rule settings
Query section
| Setting name | Description |
|---|---|
|
SQL instance
|
Specify the name of the SQL Instance as defined in the Utils Extension SQL Server configuration. Using the Default SQL Instance setting will retrieve the current setting from the SQL Connection settings of the Utils extension. NOTE: For more information, review the Connecting to Microsoft SQL Server data source article. |
SQL database name |
Specify a database name from the selected SQL Instance. |
SQL table |
Specify a SQL Table or View from the selected database. Click the [...] button to display a list of tables to choose from. |
SQL credentials |
Click the [...] button to enter SQL Credentials. NOTE: Cayosoft Administrator does not support Windows Authentication for connecting to a Microsoft SQL Server database. The database connection must use SQL Server Authentication, where the credentials (username and password) are created and managed within SQL Server itself. Mixed Mode refers to the SQL Server configuration that allows both SQL Server Authentication and Windows Authentication, but only SQL Server Authentication is supported by Cayosoft Administrator. |
Data Source Filter |
You can use the point-and-click filter builder for the specified data source. NOTE: If the Where clause is also specified, it will be applied and DataSource Filter will be ignored. |
More options | |
|
Return these SQL columns
|
Specify columns returned by the data source. |
Where clause |
Define a WHERE statement in the SQL query sent to the data source to limit the rows returned by SQL Server. |
Properties to display |
Select properties to display for each object found by the query. |
|
Filter data
|
Set the filtering conditions to hide unwanted data based on criteria not supported in the Query criteria setting. Example: filter by the found object Distinguished Name. TIP: For optimal performance, use the Query criteria setting above to filter objects whenever possible. |
Skip user if anchor attribute already exists |
The anchor attribute must be unique in the Data Source. Using the defined Anchor attribute, the rule checks to see if the anchor is already present in Active Directory. If the anchor is present, then this user was previously created, and the row in the Data Source is skipped. |
Data source anchor attribute |
Defines the column in the Data Source that will be used to determine if the user account already exists. This value is compared to the Active Directory Anchor Attribute. Because user names are likely to have duplicates, some other attribute with a unique value should be used to determine if records read from the Data Source have already been processed. |
Active directory anchor attribute |
Defines the attribute in the Active Directory to which the Data Source anchor attribute is to be compared. When a new user is created this value also specifies the Active Directory attribute into which the Data Source anchor is written for comparison the next time the rule is executed. |
Action section
| Setting name | Description |
|---|---|
Create in |
Determines the initial location within Active Directory, where the new user accounts are to be created. NOTE: For simplicity, Cayosoft recommends that new objects be created in a separate OU then moved to the final location after provisioning is completed. The Text file | DynamicAttributes™ Relocate AD Users rule can be used to automatically move new user objects to the desired OU after the accounts are fully provisioned. |
| Account | |
|
Logon Name (SamAccountName)
|
By default, SamAccountName is automatically generated from the data source, provided it contains correctly named fields. If the field names differ from those required for the selected format, contact Cayosoft to configure an override format. Additionally, the SamAccountName must be unique within the target domain. |
|
UPNSuffix
|
Define the domain name component of the new user UserPrincipalName (UPN). The default UPN suffix is defined in the Default domain setting within the AD Users web query. If you are using Microsoft 365, ensure this value is set to a domain registered in Microsoft 365/Entra ID. |
|
UserPrincipalName
|
By default, UserPrincipalName (UPN) is automatically generated from the data source, provided it contains correctly named fields. If the field names differ from those required for the selected UPN format, contact Cayosoft to configure an override format. The UPN value must be unique. |
FirstName (GivenName) |
If the Data Source contains a field named FirstName, ignore this setting. Otherwise, use the Selector button to choose a field from the Data Source. |
Initials |
Specify user initials. |
Last/Surname (sn) |
If the Data Source contains a field named LastName, ignore this setting. Otherwise, use the Selector button to choose a field from the Data Source. |
|
Name (cn)
|
If the Data Source contains fields named FirstName and LastName, choose the desired format or ignore this setting. Otherwise, use the Selector button to select a field from the Data Source or contact Cayosoft for an override format. |
|
Display Name
|
If the Data Source contains fields named FirstName and LastName, choose the desired format ignore this setting. Otherwise, use the Selector button to select a field from the Data Source or contact Cayosoft for an override format. |
|
Description
|
If the Data Source contains a field name Description, ignore this setting. Otherwise, manually enter a static text value or use the Selector button to choose a field from the Data Source. |
Settings | |
Default Password |
This setting defines the password for the new account. This value can be static text, a field from the Data Source chosen using the Selection button, or set to Generate Random Password. NOTE: Static passwords or passwords from the Data Source must meet the Active Directory Password Complexity Policy of the target container, or the account will be created in a disabled state. Randomly Generated Passwords will be generated to match both the Active Directory Password Complexity Policy and additional complexity requirements defined in the Cayosoft Administrator Password Complexity Policy. |
|
These settings enable/disable the standard Active Directory user object settings. |
Account Expiration Date |
This setting defines the Account Expiration attribute in Active Directory. In addition to populating this field from the Data Source, a text string can also be manually entered into the field in the format MM/DD/YYYY or YYYY-MM-DD. |
Organization | |
|
If the Data Source contains one of these field names, ignore this setting. Otherwise, manually enter a static text value or use the Selector button to choose a field from the Data Source. |
Manager Identifier |
Use the Selector button to choose a field from the Data Source that is a unique identifier for the user’s manager. Typically this will be the Managers EmployeeNumber or EmployeeID. |
AD Attribute for Manager Lookup |
Select an Active Directory attribute that is used to search for the value of the Manager Identifier specified in the field above. |
Contact Info | |
Country |
If the Data Source contains a field name Country, ignore this setting. Otherwise, manually enter a static text value or use the Selector button to choose a field from the Data Source. |
Email Address |
Specify the format for email address. NOTE: If alternative SMTP addresses are needed, the AD Users | Set Proxy Addresses rule can be run after this rule. |
|
If the Data Source contains a field with one of these names, ignore this setting. Otherwise manually enter a static text value or use the Selector button to choose a field from the Data Source.
|
Alternate Name Generation Rules | |
Name conflict resolution |
This option determines how the system should react when the name of a user being created already exists. |
|
The behavior of this attribute is the same as in the Contact Info section.
|
Counter Format |
This setting specifies the number of fixed symbols the counter should have. |
Add counter when |
Specifies if a counter should always be added to the username, or only when name conflicts occur. The counter option is not available when the Use Alternative Generation Rules option is set to On failure record error in Rule Execution History and go on. |
Other Properties | |
Other properties |
Using picker dialog, set a mapping between data source columns and target user properties. |
Other properties script |
Data mapping also can be set by the script. If you want every provisioned user to have extension attribute 1 populated with some string value then use this
Copy
If you want every provisioned user to have extension attribute 2 populated with the corresponding value from the column in your data source file, then use this:
Copy
since NOTE: If you set mapping for the same properties both in Other properties and Other properties script, attribute values will be updated by the script. |
Notify Manager | |
Notify Manager |
Specify whether you want to notify the manager when the user is created. You can also select send an email for each created user or send one email for all created users. |
Additional to |
Additional email can be sent to Default Notify & Alert Email Address - usually, this is the administrator's email address. |
CC, BCC |
Email address where the copy will be sent. |
From |
Users can receive emails from default SMTP from address. |
Subject |
Email subject. TIP: It is possible to customize email subjects by using different tokens, see Customizing an automation rule or web action output email. |
Message |
Message text. TIP: It is possible to customize email messages by using different tokens, see Customizing an automation rule or web action output email. |
Limit the number of emails sent per minute |
An integer value that represents the number of emails sent per minute by this rule. To change the default value, navigate to Configuration > Settings > Email Settings (SMTP). The default limit for Microsoft 365 SMTP gate is 30 emails per minute. |
Output Section
This section defines the output format of this rule.
To get more information about this section, please see the Rule Output section article.
Enforce/Schedule Section
This section defines the schedule for how often to run the rule.
To get more information about this section, please see the Rule Enforce/Schedule section article.
Comments
0 comments
Please sign in to leave a comment.