---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/orgs](../index.md) / getOrgByName

# Function: getOrgByName()

> **getOrgByName**(`client`, `name`): `Promise`\<[`AccountManagerOrganization`](../../../clients/interfaces/AccountManagerOrganization.md)\>

Defined in: [packages/b2c-tooling-sdk/src/operations/orgs/index.ts:88](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/orgs/index.ts#L88)

Gets an organization by name (performs case-sensitive prefix search using startsWith, filters to exact match if multiple results are found, throws if ambiguous).

## Parameters

### client

[`AccountManagerOrgsClient`](../../../clients/interfaces/AccountManagerOrgsClient.md)

Account Manager Organizations client

### name

`string`

Organization name

## Returns

`Promise`\<[`AccountManagerOrganization`](../../../clients/interfaces/AccountManagerOrganization.md)\>

Organization details

## Throws

If the organization is not found or if multiple organizations match the name
