diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 791ab0fe0e..d3b2af0925 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -225,6 +225,13 @@ Http::init() API_KEY_ACCOUNT => ACTOR_TYPE_KEY_ACCOUNT, default => ACTOR_TYPE_KEY_ORGANIZATION, }); + + if ($apiKey->getType() === API_KEY_STANDARD) { + $userClone + ->setAttribute('$id', $dbKey->getId()) + ->setAttribute('$sequence', $dbKey->getSequence()); + } + $auditContext->user = $userClone; }