Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

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

Function: createAccountManagerOrgsClient()

createAccountManagerOrgsClient(config, auth): AccountManagerOrgsClient

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

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.