Query Active Directory Global Catalog from workflow form

In our environment we have a workflow that is used for creating service and test accounts. The user fills out the basic information such as username, pwd, OU etc. I need to be able to query a Global Catalog server in internal Active Directory from the workflow form to ensure that the username selected is unique across our AD forest. Unfortunately not all user accounts are created via our Identity Manager\User App environment and so the need to be able to ensure the name is unique. If anyone has any insight on how this can be accomplished and\or any examples on how to go about this, it would be greatly helpful.