Skip to content
View as Markdown
View as Markdown

@salesforce/b2c-tooling-sdk / operations/mrt / getOrgMember

Function: getOrgMember()

getOrgMember(options, auth): Promise<{ }>

Defined in: packages/b2c-tooling-sdk/src/operations/mrt/organization-member.ts:201

Gets an organization member by email.

Parameters

options

GetOrgMemberOptions

Get options including organization slug and email

auth

AuthStrategy

Authentication strategy (ApiKeyStrategy)

Returns

Promise<{ }>

The organization member details

Throws

Error if the request fails or member is not found

Example

typescript
import { ApiKeyStrategy } from '@salesforce/b2c-tooling-sdk/auth';
import { getOrgMember } from '@salesforce/b2c-tooling-sdk/operations/mrt';

const auth = new ApiKeyStrategy(process.env.MRT_API_KEY!, 'Authorization');

const member = await getOrgMember({
  organizationSlug: 'my-org',
  email: 'user@example.com'
}, auth);

console.log(`Member role: ${member.role}`);

Released under the Apache-2.0 License.