"A referral was returned from the server." error from AD.X or Exchange.X command
Top  Previous  Next


The error message "A referral was returned from the server." means that the account, group, container or OU can not be found in the specified active directory path.

Checklist:

·Is the domain part OK?  
·Example: domain name = "D09.acme.com" -> "dc=com/dc=acme/dc=D09"  
·Try to ping the domain name. Example: start the command prompt and type "ping D09.acme.com"  
·Is the OU or container part OK?  
·Each ou should be preceded with "/ou=". Example: OU "SubOU" in OU "RootOU" -> "/ou=RootOU/ou=SubOU"  
·Containers should be preceded with "/cn=". "Users" is a container, not an OU. Example: "/cn=Users"  
·Try replacing variables with the actual full path to get a clearer view, example:  

SET ADDomainPath=dc=com/dc=acme/dc=D2
SET ADOU=Students
SET ADOUPath=%ADDomainPath%/ou=%ADOU%

AD.Account.Create %ADOUPath%,%AccountName%,%AccountName%,%Password%

->

AD.Account.Create dc=com/dc=acme/dc=D2/ou=Students,%AccountName%,%AccountName%,%Password%