Import Subscriber From AD
If You Are Running 4.0(1) READ THIS
Using Import Subscriber From AD
This example contains two basic parts. The frmMain form allows you to navigate around Active Directory and see users that are either subscribers (shown with a bunny icon) or a user (shown with a globe icon). This is very similar to the “Remove Subscriber Properties” example application and there’s not much different here other than the menu options are different.
The real meat of this example is found in the frmImport form which at runtime looks like this:

The code in this form covers a number of really important items here – it shows how to check for available licenses, make sure the extension number is unique across the dialing domain, shows how to add the subscriber via a stored procedure and how to check for errors in the synchronization process with the directory asynchronously on the back end. Basically everything you need to know about importing users from AD is covered here.
You need to upgrade to 4.0(2) to use this code sample
properly. You will need to install the Cisco Unity Access Libraries (CUAL)
which is available off the source code samples page of www.CiscoUnityTools.com.
This example is written to be run on the Unity server you are testing with (please don’t use a production Unity server for this). There are other programming examples on www.CiscoUnityTools.com that show how to find and connect to remote Unity servers that you can use for details on how to do that.
This tool ONLY works for importing users from Active Directory with Exchange 2000. You can apply the same principals for importing users from Exchange 5.5 if you wish, however Domino is a bit of a different process. Currently we’re only working with Exchange 5.5 or 2000 with the provisioning examples. Domino examples will come along in a later 4.0(x) release.
Using the tool is pretty straight forward. Navigate to a user that is not already tagged as a subscriber in the directory on the main form. Users that have Unity properties on them are shown with the “bunny” icon and those that do not are shown with the globe icons:

Once you select a user you want to import you can right click on them or select the Options menu item and select “Import subscriber”. The alias of that user is passed to the frmImport form shown above and you can select a template and provide an extension number and then execute the subscriber add.
I’ll be updating these source code examples and adding new ones on the “source code samples” page of www.CiscoUnityTools.com on a fairly regular basis so check back for new info.
Version 1.0.2
Updated for 4.0(2) release
Version 1.0.1
First ship of example source
© 2003 Cisco Systems, Inc. -- Company Confidential