> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Organization by Slug

> Retrieve Organization details by slug using the Stytch React SDK

The `organization.getBySlug` method can be used to retrieve details about an Organization (Represents an instance or tenant in your application, typically mapping to each of your top-level customers.) from its slug.

This method may be called even if the Member (Represents an individual end user's account within a given Organization, uniquely identified within that Organization by their email address.) is not logged in, so it returns a subset of non-sensitive information about the Organization.

## Parameters

**organization\_slug** `string`

The unique URL slug of the Organization to get.

The slug only accepts alphanumeric characters and the following reserved characters: `- . _ ~`. Must be between 2 and 128 characters in length.

## Response

**organization** `object`

**properties**

**organization\_id** `string`

Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the `organization_slug` or `organization_external_id` here as a convenience.

**organization\_name** `string`

The name of the Organization. Must be between 1 and 128 characters in length.

**organization\_logo\_url** `string`

The image URL of the Organization logo.

**organization\_slug** `string`

The unique URL slug of the Organization.

The slug only accepts alphanumeric characters and the following reserved characters: `- . _ ~`. Must be between 2 and 128 characters in length.

Wherever an `organization_id` is expected in a path or request parameter, you may also use the `organization_slug` as a convenience.

**sso\_active\_connections** `array[objects]`

An array of active [SAML Connection references](https://stytch.com/docs/api-reference/b2b/api/sso/saml-connection-object.md) or [OIDC Connection references](https://stytch.com/docs/api-reference/b2b/api/sso/oidc-connection-object.md).

**sso\_active\_connections properties**

**connection\_id** `string`

Globally unique UUID that identifies a specific SSO `connection_id` for a Member.

**display\_name** `string`

A human-readable display name for the connection.

**email\_allowed\_domains** `array[strings]`

An array of email domains that allow invites or JIT provisioning for new Members. This list is enforced when either `email_invites` or `email_jit_provisioning` is set to `RESTRICTED`

Common domains such as gmail.com are not allowed. See the [full list of disallowed common email domains](https://stytch.com/docs/multi-tenant-auth/enterprise-ready/org-management/jit-provision-members.md#by-email-domain).

**email\_jit\_provisioning** `string`

The authentication setting that controls how a new Member can be provisioned by authenticating via Email Magic Link or OAuth. The accepted values are:

* `RESTRICTED` – only new Members with verified emails that comply with `email_allowed_domains` can be provisioned upon authentication via Email Magic Link or OAuth
* `NOT_ALLOWED` – the default setting, disables JIT provisioning via Email Magic Link and OAuth

**auth\_methods** `string`

The setting that controls which authentication methods can be used by Members of an Organization. The accepted values are:

* `ALL_ALLOWED` – the default setting which allows all authentication methods to be used
* `RESTRICTED` – only methods that comply with `allowed_auth_methods` can be used for authentication. This setting does not apply to Members with `is_breakglass` set to true

**allowed\_auth\_methods** `array[strings]`

An array of allowed authentication methods. This list is enforced when `auth_methods` is set to `RESTRICTED`. The list's accepted values are: `sso`, `magic_link`, `email_otp`, `password`, `google_oauth`, `microsoft_oauth`, `slack_oauth`, `github_oauth`, and `hubspot_oauth`.

**sso\_default\_connection\_id** `string`

The default connection used for SSO when there are multiple active connections.

**oauth\_tenant\_jit\_provisioning** `string`

The authentication setting that controls how a new Member can JIT provision into an Organization by tenant. The accepted values are:

* `RESTRICTED` – only new Members with tenants in `allowed_oauth_tenants` can JIT provision via tenant
* `NOT_ALLOWED` – the default setting, disables JIT provisioning by OAuth Tenant

**allowed\_oauth\_tenants** `object`

A map of allowed OAuth tenants. If this field is not passed in, the Organization will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack", "hubspot", and "github".

**request\_id** `string`

Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
may ask for this value to help identify a specific API call when helping you debug an issue.

**status\_code** `number`

The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.

```jsx theme={null}
import { useEffect, useState } from 'react';
import { useStytchB2BClient } from '@stytch/react/b2b';

export const OrganizationInfo = ({ slug }) => {
  const stytch = useStytchB2BClient();
  const [organization, setOrganization] = useState();

  useEffect(() => {
    stytch.organization
      .getBySlug({ organization_slug: slug })
      .then((response) => setOrganization(response.organization));
  }, [stytch, slug]);

  if (organization === undefined) {
    return <p>Loading...</p>;
  }

  if (organization === null) {
    return <p>No organization found for {slug}</p>;
  }

  return <p>Name: {organization.organization_name}</p>;
};
```

```json theme={null}
{
  "status_code": 200,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "organization": {
    "allowed_auth_methods": [],
    "auth_methods": "ALL_ALLOWED",
    "email_allowed_domains": [],
    "email_jit_provisioning": "NOT_ALLOWED",
    "mfa_policy": "OPTIONAL",
    "organization_id": "organization-test-staging-12345",
    "organization_logo_url": "",
    "organization_name": "Example Org Inc",
    "sso_active_connections": [],
    "sso_default_connection_id": null,
  }
}
```
