diff --git a/src/commands/whoami/functions.ts b/src/commands/whoami/functions.ts index 6939d18c..12607105 100644 --- a/src/commands/whoami/functions.ts +++ b/src/commands/whoami/functions.ts @@ -14,7 +14,7 @@ import Command from '../../lib/base'; Messages.importMessagesDirectory(__dirname); const messages = Messages.loadMessages('@salesforce/plugin-functions', 'whoami.functions'); -const FIELDS = ['id', 'email', 'token']; +const FIELDS = ['id', 'salesforce_username', 'salesforce_email', 'token']; export type FunctionsInformationKey = typeof FIELDS[number]; export type FunctionsInformation = { [key in FunctionsInformationKey]?: string }; @@ -49,13 +49,15 @@ export default class WhoAmI extends Command { if (flags['show-token']) { return { - functionsEmail: ret['email'], + functionsEmail: ret['salesforce_email'], + functionsUsername: ret['salesforce_username'], functionsId: ret['id'], functionsToken: this.auth, }; } else { return { - functionsEmail: ret['email'], + functionsEmail: ret['salesforce_email'], + functionsUsername: ret['salesforce_username'], functionsId: ret['id'], }; }