From 56faa19b1aca36ee587e407ebd84d7ed5749a77f Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 22 Mar 2021 11:42:24 -0500 Subject: [PATCH] fix: wrong user id on create --- src/commands/force/user/create.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/force/user/create.ts b/src/commands/force/user/create.ts index ebd7841c..29890468 100644 --- a/src/commands/force/user/create.ts +++ b/src/commands/force/user/create.ts @@ -102,6 +102,7 @@ export class UserCreateCommand extends SfdxCommand { // merge defaults with provided values with cli > file > defaults const fields = await this.aggregateFields(defaultUserFields.getFields()); + try { this.authInfo = await this.user.createUser(UserCreateCommand.stripInvalidAPIFields(fields)); } catch (e) { @@ -160,6 +161,7 @@ export class UserCreateCommand extends SfdxCommand { await alias.write(); } + fields.id = this.authInfo.getFields().userId; this.print(fields); const { permsets, ...fieldsWithoutPermsets } = fields;