Skip to content
View as Markdown
View as Markdown

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

Function: createAccountManagerOrgsClient()

createAccountManagerOrgsClient(config, auth): AccountManagerOrgsClient

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

Creates an Account Manager Organizations API client.

Parameters

config

AccountManagerClientConfig

Account Manager Organizations client configuration

auth

AuthStrategy

Authentication strategy (typically OAuth)

Returns

AccountManagerOrgsClient

Organizations API client

Example

ts
const oauthStrategy = new OAuthStrategy({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
});

const client = createAccountManagerOrgsClient({}, oauthStrategy);

// List organizations
const orgs = await client.listOrgs({ size: 25, page: 0 });

// Get organization by ID
const org = await client.getOrg('org-id');

Released under the Apache-2.0 License.