Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

External Auth not working anymore


Dear community,

I had implemented TestRail from the beginning with external Authentication. Since a few days for some reason I always get the following error when trying to login with AD credentials:

External auth: Authenticated successfully, but no TestRail user was found for the given account.

As I understand this error is the authentication is working fine but it’s not matching with SQL DB anymore.

When I login with internal TestRail Account it is working fine.

Only thing what was changed is the Host of the virtual DB, and Webserver (as-is-move from esx host to esx host). Already checked all ports from auth.php they are all still open and working and external auth is still active within site settings.

do you have any suggestion how this error can be solved or where the problem can came from?

Error details from system logs:
[AuthException] External auth: Authenticated successfully, but no TestRail user was found for the given account.
_ —_
_ Details: _
_ File: C:\inetpub\wwwroot\testrail\sys\helpers\ex.php_
_ Line: 25_
_ Status Code: 500_
_ Host: testrail.xy.com_
_ Uri: /index.php?/auth/login/ (POST)_
_ —_
_ Browser: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)_
_ PHP: 5.6.22_
_ Server: Windows NT 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) i586_
_ —_
_ name: ******_
_ password: _
_ rememberme: 1_
_ —_
_ Trace:_
_ at ex::raise (ex.php:77)_
_ at ex::raiset (custom.php:104)_
_ at Auth_custom_driver->handle_success (custom.php:285)
_ at Auth_custom_driver->login (custom.php:305)
_ at Auth_custom_driver->login (auth.php:501)_
_ at Auth_library->login_custom (auth.php:488)
_ at Auth_library->login (auth.php:418)
_ at Auth_library->login (auth.php:57)_
_ at Auth_controller->login (:)_
_ at call_user_func_array (controller.php:257)_
_ at Controller->invoke_web_call (controller.php:168)
_ at Controller->invoke_web (controller.php:120)
_ at Controller->invoke (gizmo.php:107)
_ at require_once (index.php:106)_


Hi Roger,

Thanks for your posting. Are you still using the same login and have the same email address configured for your user in Active Directory? TestRail uses the email address in AD to match a AD login to the user record in TestRail and if the email address has changed then TestRail wouldn’t be able to find the user in TestRail. Or would this be for a new user who doesn’t yet have a user record in TestRail?



Hey Tobias,

Thanks for this hint with the E-Mail address this already solved my problem! E-Mail adress was wrong for this user…



Hi Roger,

Great to hear that it’s working now :slight_smile: