Skip to main content
import { useStytchOrganization } from '@stytch/react/b2b';

export const Home = () => {
  const { organization } = useStytchOrganization();

  return organization
    ? <p>Welcome to {organization.organization_name}</p>
    : <p>Log in to continue!</p>;
};
{
  "organization": { ... },
  "isInitialized": true,
  "fromCache": false
}
To get the of the currently signed in , use the useStytchOrganization hook. If the user is not signed in, the organization object will be null. In non-React environments, use the organization.getSync method to get the Organization.

Return Value

organization
object | null
The Organization of the currently signed in Member.
fromCache
boolean
Whether the Organization data is from persistent storage.