Skip to content

@salesforce/b2c-tooling-sdk / clients / getUser

Function: getUser() ​

getUser(client, userId, expand?): Promise<{ }>

Defined in: packages/b2c-tooling-sdk/src/clients/am-api.ts:258

Retrieves details of a user by ID.

Parameters ​

client ​

AccountManagerUsersClient

Account Manager Users client

userId ​

string

User ID (UUID)

expand? ​

("roles" | "organizations")[]

Optional array of fields to expand (organizations, roles)

Returns ​

Promise<{ }>

User details

Throws ​

Error if user is not found or request fails

Released under the Apache-2.0 License.