Disallow Specifying Telephones without Country Code
With the help of Adaxes it is possible to specify the format for any property of Active Directory objects. The format can be specified either with the help of regular expressions or using constraints like 'must start with', 'must not contain', etc. In this tutorial you will learn how to make phone numbers specified for Active Directory users to start with '+44'.
To configure Adaxes to verify that all phone numbers start with the country code, you need to create a Property Pattern for the User object type and specify certain constraints for the Telephone Number property.
Launch Adaxes Administration Console, right-click your Adaxes service, point to New and click Property Pattern. The Create Property Pattern wizard will open.
Enter the name for the new Property Pattern and click Next.
Here you need to select the AD object type, properties of which the new Property Pattern will affect. As we want to specify the format for the Telephone Number property of user objects, select User in the Object Type list and click Next.
At the Configure Property Pattern, page you can specify value generation options and formatting constraints for the AD properties you need. Click Add and select the Telephone Number property from the drop-down list.
In the Add Property Pattern Item dialog, select the Must start with option and type '+44' in the edit-box.
- Select the Must match regexp option.
- In the edit box for this option, enter a regular expression, for example
- Click the icon located next to the edit box and specify the error message that will be shown if a telephone number has an invalid format.
When finished, click OK and then click Next.
Here, at the Activity Scope page you need to specify where in Active directory a user must be located, or to what groups or Business Units it must belong to be affected by the Property Pattern. Click Add.
In the Property Pattern Activity Scope dialog that opens, select one of the following items:
All Objects - select if you want this Property Pattern to be effective when
creating or modifying any user in any AD domain managed by the Adaxes service.
Specific Domain - select if you want this Property Pattern to be effective
when creating or modifying any user in the AD domain you specify.
OU or Container - select if you want this Property Pattern to be effective
when creating or modifying any user located under the selected OU or container.
Group - select a specific group if you want this Property Pattern to be effective
when modifying users that are members of the selected group.
- Business Unit - select a Business Unit if you want this Property Pattern to be effective when modifying users that are members of the selected Business Unit. To view available Business Units, select the Business Units item in the Look in drop-down list.
Select the item you need and click Add. When finished, click OK.
The specified activity scope items will be displayed in the Assignments list. Click Finish.
Now, when the Property Pattern is complete, Adaxes will verify that all phone numbers specified for AD users correspond to the specified format.