{"record":{"id":"acb29abe4aa39425","repo":"phacility/phabricator","slug":"ldap-record-query-returned-more-than-one-result-t","errorCode":null,"errorMessage":"LDAP record query returned more than one result. The query must uniquely identify a record.","messagePattern":"LDAP record query returned more than one result\\. The query must uniquely identify a record\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/auth/adapter/PhutilLDAPAuthAdapter.php","lineNumber":384,"sourceCode":"\n      $this->ldapConnection = $conn;\n    }\n\n    return $this->ldapConnection;\n  }\n\n\n  private function searchLDAPForRecord($dn) {\n    $conn = $this->establishConnection();\n\n    $results = $this->searchLDAP('%Q', $dn);\n\n    if (!$results) {\n      return null;\n    }\n\n    if (count($results) > 1) {\n      throw new Exception(\n        pht(\n          'LDAP record query returned more than one result. The query must '.\n          'uniquely identify a record.'));\n    }\n\n    return head($results);\n  }\n\n  public function searchLDAP($pattern /* ... */) {\n    $args = func_get_args();\n    $query = call_user_func_array('ldap_sprintf', $args);\n\n    $conn = $this->establishConnection();\n\n    $profiler = PhutilServiceProfiler::getInstance();\n    $call_id = $profiler->beginServiceCall(\n      array(\n        'type'  => 'ldap',","sourceCodeStart":366,"sourceCodeEnd":402,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/auth/adapter/PhutilLDAPAuthAdapter.php#L366-L402","documentation":"Error \"LDAP record query returned more than one result. The query must uniquely identify a record.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/auth/adapter/PhutilLDAPAuthAdapter.php:384 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}