{"record":{"id":"1f2e1abc119efdde","repo":"phacility/phabricator","slug":"no-such-user-s","errorCode":null,"errorMessage":"No such user \"%s\"!","messagePattern":"No such user \"(.+?)\"!","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/auth/management/PhabricatorAuthManagementRefreshWorkflow.php","lineNumber":45,"sourceCode":"\n    $query = id(new PhabricatorExternalAccountQuery())\n      ->setViewer($viewer)\n      ->requireCapabilities(\n        array(\n          PhabricatorPolicyCapability::CAN_VIEW,\n          PhabricatorPolicyCapability::CAN_EDIT,\n        ));\n\n    $username = $args->getArg('user');\n    if (strlen($username)) {\n      $user = id(new PhabricatorPeopleQuery())\n        ->setViewer($viewer)\n        ->withUsernames(array($username))\n        ->executeOne();\n      if ($user) {\n        $query->withUserPHIDs(array($user->getPHID()));\n      } else {\n        throw new PhutilArgumentUsageException(\n          pht('No such user \"%s\"!', $username));\n      }\n    }\n\n    $accounts = $query->execute();\n\n    if (!$accounts) {\n      throw new PhutilArgumentUsageException(\n        pht('No accounts match the arguments!'));\n    } else {\n      $console->writeOut(\n        \"%s\\n\",\n        pht(\n          'Found %s account(s) to refresh.',\n          phutil_count($accounts)));\n    }\n\n    $providers = PhabricatorAuthProvider::getAllEnabledProviders();","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/auth/management/PhabricatorAuthManagementRefreshWorkflow.php#L27-L63","documentation":"bin/auth refresh --user <name> filters the OAuth token refresh by a Phabricator user; when PhabricatorPeopleQuery finds no user with that exact username, the workflow aborts with this usage exception before querying external accounts.","triggerScenarios":"Running './bin/auth refresh --user alinceoln' (typo), or a username that exists only in the external IdP and has no Phabricator account.","commonSituations":"Case-sensitive or misspelled usernames; renamed users; local-only testing with names that were never provisioned.","solutions":["Fix the username spelling (exact, case-sensitive) and re-run.","Run './bin/auth refresh' without --user to refresh all external accounts, then narrow once names are confirmed."],"exampleFix":"// before\n./bin/auth refresh --user alinceoln\n// after\n./bin/auth refresh --user alincoln","handlingStrategy":"validation","validationCode":"// Verify before invoking the workflow.\n$user = id(new PhabricatorPeopleQuery())\n  ->setViewer(PhabricatorUser::getOmnipotentUser())\n  ->withUsernames(array($username))\n  ->executeOne();\nif (!$user) {\n  // fail early with 'unknown username' instead of running the workflow\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Usernames are exact and case-sensitive; copy them from People.","When unsure, run './bin/auth refresh' without --user first to confirm accounts exist."],"tags":["cli","user-not-found","external-accounts","phabricator"],"backgroundTag":"user-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}