phacility/phabricator · error · PhutilArgumentUsageException
Specify an OAuth client id with "--id".
Error message
Specify an OAuth client id with "--id".
What it means
Usage guard in the OAuth trust CLI workflow: fires when the --id argument is empty/falsy, so there is no OAuth client to mark as trusted. The client id is a required singular argument; the check runs before any database lookup.
Solutions
- Find the client ID in the OAuth Clients application and pass it with --id
- Run the workflow with --help to confirm the expected argument form
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/auth/management/PhabricatorAuthManagementTrustOAuthClientWorkflow.php:29 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/72210f06ac0bc63a.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/auth/management/PhabricatorAuthManagementTrustOAuthClientWorkflow.php:29
pht(
'Mark an OAuth client as trusted. Trusted OAuth clients may be '.
'reauthorized without requiring users to manually confirm the '.
'action.'))
->setArguments(
array(
array(
'name' => 'id',
'param' => 'id',
'help' => pht('The id of the OAuth client.'),
),
));
}
public function execute(PhutilArgumentParser $args) {
$id = $args->getArg('id');
if (!$id) {
throw new PhutilArgumentUsageException(
pht(
'Specify an OAuth client id with "--id".'));
}
$client = id(new PhabricatorOAuthServerClientQuery())
->setViewer($this->getViewer())
->withIDs(array($id))
->executeOne();
if (!$client) {
throw new PhutilArgumentUsageException(
pht(
'Failed to find an OAuth client with id %s.', $id));
}
if ($client->getIsTrusted()) {
throw new PhutilArgumentUsageException(
pht(View on GitHub (pinned to 5720a38cfe)