This scenario describes how to configure a policy that forces the user phone number to conform to the following format:
-
The first character must be “+”.
-
The second character(s) must be the country code.
(This is 1 in the US and Canada, and 61 in Australia for example.)
-
Use spaces (instead of dashes or braces) to separate area code.
-
Use spaces (instead of dashes) to separate the phone number.
-
Optionally, use a lowercase “x” to indicate an extension.
The following table provides some examples to clarify how the phone number should look in accordance with these formatting requirements.
Table 18: Phone number format
+1 949 754 8515 |
949-754-8515 |
The incorrect entry does not begin with + and country code, and uses dashes instead of space. |
+44 1628 606699 x1199 |
+44 1628 606699 X1199 |
The incorrect entry uses the upper-case X. |
To implement this scenario, you must perform the following actions:
-
Configure the Policy Object that defines the appropriate policy.
-
Apply the Policy Object to a domain, OU, or Managed Unit.
As a result, when creating or modifying a user object in the container you selected in Step 2, Active Roles checks whether the phone number conforms to the stated format. If not, the policy disallows the creation or modification of the user object.
You can configure the Policy Object you need by modifying the Policy Object that implements Scenario 1: Using mask to control phone number format.
Display the Properties dialog for that Policy Object and go to the Policies tab. Then, select the policy from the list, and click View/Edit to display the Property Generation and Validation Policy Properties dialog.
The Policy Rule tab in the Property Generation and Validation Policy Properties dialog looks similar to the Configure Policy Rule page in the wizard you used to configure the policy. You can use that tab to modify the policy rules.
First, modify the rule to remove the mask entry. On the Policy Rule tab, in the upper box, clear the ‘Telephone Number’ must be <value> check box.
Next, choose to configure a rule based on regular expressions. On the Policy Rule tab, in the upper box, select the ‘Telephone Number’ must match regular expression <value> check box. To access this check box, you need to scroll down the list of check boxes.
Finally, specify the regular expressions that define the policy in question. The regular expressions you need are as follows:
^\+([0-9]+ )+[0-9]+$
^\+([0-9]+ )+x[0-9]+$
Table 19: Regular expressions
^ |
The beginning of the input string to validate |
\+ |
The escape sequence to represent the plus character (+) |
([0-9]+ )+ |
Concatenation of one or more substrings, with each substring consisting of one or more digit characters followed by a space character |
[0-9]+ |
One or more digit characters |
x[0-9]+ |
A lowercase "x" followed by one or more digit characters |
$ |
The end of the input string to validate |
Thus, the policy must be configured to only allow the telephone numbers that match ^\+([0-9]+ )+[0-9]+$ (telephone numbers without extensions) or ^\+([0-9]+ )+x[0-9]+$ (telephone numbers that include extensions). Proceed with configuring the policy as follows:
-
On the Policy Rule tab, in the lower box, click the link labeled <click to add value>.
-
In the Add Value dialog, enter ^\+([0-9]+ )+[0-9]+$, and click OK.
-
On the Policy Rule tab, in the lower box, click <click to add value>.
-
In the Add Value dialog, enter ^\+([0-9]+ )+x[0-9]+$, and click OK.
-
Click OK to close the Property Generation and Validation Policy Properties dialog.
You can apply the Policy Object without closing its Properties dialog. Go to the Scope tab and do the following:
-
On the Scope tab, click the Scope button to display the Active Roles Policy Scope window for the Policy Object you are managing.
-
Click Add and select the domain, OU, or Managed Unit where you want to apply the policy to.
You can also use the Remove button to remove items where you want the policy to no longer be applied.
-
Click OK to close the Active Roles Policy Scope window.
-
Click OK to close the Properties dialog for the Policy Object.
For more information on how to apply a Policy Object, see Applying Policy Objects and Managing policy scope.
Policies in this category are intended to automate the assignment of the pre-Windows 2000 user logon name when creating or modifying a user account, with flexible options to ensure uniqueness of the policy-generated name.
The ability to generate a unique name is essential. If Active Roles attempts to assign a policy-generated name when there is an existing user account with the same pre-Windows 2000 user logon name, a naming conflict will occur. Active Directory does not support multiple accounts with the same pre-Windows 2000 user logon name. A policy can be configured to generate a series of names in order to prevent naming conflicts with existing accounts.
When configuring a policy of this category, you can define multiple rules so that the policy applies them successively, attempting to generate a unique name in the event of a naming conflict. You can also configure a rule to include an incremental numeric value to ensure uniqueness of the policy-generated name. You also have the option to allow policy-generated names to be modified by operators who create or update user accounts.