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

# OrganizationSelection

> Universal Login の `organization-selection` 画面をカスタマイズするために使用できる、すべてのフックとメソッドについて説明します。

`organization-selection` 画面は、認証フローを続行するためにユーザーが組織名を入力する必要がある場合に表示されます。ユーザーは組織名を入力して続行できます。

<Frame>
  <img style={{maxHeight:"400px"}} src="https://mintcdn.com/translations/3nS3prIggmJG9TUI/docs/images/cdy7uua7fh8z/3okogBPGS1KmSlhUSk9xhk/07bc19ad8b58772d3de872a49b8f6ca5/Screenshot_2025-03-25_at_20.27.41.png?fit=max&auto=format&n=3nS3prIggmJG9TUI&q=85&s=2f01715c3e0b68497be6966424a7d5b1" alt="ACUL 組織の選択" width="365" height="491" data-path="docs/images/cdy7uua7fh8z/3okogBPGS1KmSlhUSk9xhk/07bc19ad8b58772d3de872a49b8f6ca5/Screenshot_2025-03-25_at_20.27.41.png" />
</Frame>

<div id="import">
  ## インポート
</div>

各画面には、それぞれ専用のフックとメソッドのセットがあります。SDK は、各画面で **部分インポート** と **ルートインポート** をサポートしています。

* 部分インポートを使用すると、特定のユースケースに必要なコードだけを含めることができます。
* ルートインポートを使用すると、単一のバンドルからすべての画面を読み込めます。これは、想定されるあらゆる画面に対応する統一されたビルドが必要な場合に便利です。

```jsx Import Example theme={null}
// ルートインポート
import { useOrganizationSelection } from '@auth0/auth0-acul-react';

// 部分インポート
import {
  useOrganizationSelection,
  // コンテキストフック
  useUser,
  useTenant,
  useBranding,
  useClient,
  useOrganization,
  usePrompt,
  useScreen,
  useTransaction,
  useUntrustedData,
  // 共通フック
  useCurrentScreen,
  useAuth0Themes,
  useErrors,
  // ユーティリティフック
  useChangeLanguage,
  // メソッド
  continueWithOrganizationName,
} from '@auth0/auth0-acul-react/organization-selection';

function OrganizationSelectionScreen() {
  const { continueWithOrganizationName } = useOrganizationSelection();
  return (
    <button onClick={() => continueWithOrganizationName({ organizationName: 'my-org' })}>Continue</button>
  );
}
```

<div id="context-hooks">
  ## コンテキストフック
</div>

`organization-selection` 画面で Auth0 のコンテキストデータへの読み取り専用アクセスを提供する、画面スコープのフックです。`@auth0/auth0-acul-react/organization-selection` からインポートします。

<ParamField body="useBranding" type={<span>() =&gt; <a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/BrandingMembers">BrandingMembers</a></span>}>
  このフックは、`organization-selection` 画面に表示されるロゴ、色、テーマ設定などのブランディング設定を提供します。

  ```jsx Example theme={null}
  import { useBranding } from '@auth0/auth0-acul-react/organization-selection';
  function CustomTheme() {
    const branding = useBranding();
  }
  ```
</ParamField>

<ParamField body="useClient" type={<span>() =&gt; <a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/ClientMembers">ClientMembers</a></span>}>
  このフックは、`organization-selection` 画面向けの `id`、`name`、`logoUrl` などのクライアント関連設定を提供します。

  ```jsx Example theme={null}
  import { useClient } from '@auth0/auth0-acul-react/organization-selection';
  function AppInfo() {
    const client = useClient();
  }
  ```
</ParamField>

<ParamField body="useOrganization" type={<span>() =&gt; <a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/OrganizationMembers">OrganizationMembers</a></span>}>
  このフックは、選択対象が組織スコープの場合に、ユーザーの組織に関する情報を提供します。組織コンテキストが存在しない場合は `null` を返します。

  ```jsx Example theme={null}
  import { useOrganization } from '@auth0/auth0-acul-react/organization-selection';
  function OrgSelector() {
    const organization = useOrganization();
    if (!organization) {
      return <p>No Organization context</p>;
    }
  }
  ```
</ParamField>

<ParamField body="usePrompt" type={<span>() =&gt; <a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/PromptMembers">PromptMembers</a></span>}>
  このフックには、認証フローにおける現在のプロンプトに関するデータが含まれます。

  ```jsx Example theme={null}
  import { usePrompt } from '@auth0/auth0-acul-react/organization-selection';
  function FlowInfo() {
    const prompt = usePrompt();
  }
  ```
</ParamField>

<ParamField body="useScreen" type={<span>() =&gt; <a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/ScreenMembersOnOrganizationSelection">ScreenMembersOnOrganizationSelection</a></span>}>
  このフックには、設定やコンテキストなど、`organization-selection` 画面に固有の詳細が含まれます。

  ```jsx Example theme={null}
  import { useScreen } from '@auth0/auth0-acul-react/organization-selection';
  function ScreenDebug() {
    const screen = useScreen();
  }
  ```
</ParamField>

<ParamField body="useTenant" type={<span>() =&gt; <a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/TenantMembers">TenantMembers</a></span>}>
  このフックには、`id` や関連するメタデータなど、テナントに関するデータが含まれます。

  ```jsx Example theme={null}
  import { useTenant } from '@auth0/auth0-acul-react/organization-selection';
  function TenantInfo() {
    const tenant = useTenant();
  }
  ```
</ParamField>

<ParamField body="useTransaction" type={<span>() =&gt; <a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/TransactionMembers">TransactionMembers</a></span>}>
  このフックは、アクティブな接続や現在のフローの state など、`organization-selection` 画面におけるトランザクション固有のデータを提供します。

  ```jsx Example theme={null}
  import { useTransaction } from '@auth0/auth0-acul-react/organization-selection';
  function TransactionInfo() {
    const transaction = useTransaction();
  }
  ```
</ParamField>

<ParamField body="useUntrustedData" type={<span>() =&gt; <a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/UntrustedDataMembers">UntrustedDataMembers</a></span>}>
  このフックは、URL の query string から事前入力されたパラメーターなど、画面に渡される untrusted data を扱います。

  ```jsx Example theme={null}
  import { useUntrustedData } from '@auth0/auth0-acul-react/organization-selection';
  function PrefilledForm() {
    const untrustedData = useUntrustedData();
  }
  ```
</ParamField>

<ParamField body="useUser" type={<span>() =&gt; <a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/UserMembers">UserMembers</a></span>}>
  このフックは、`username`、`email`、利用可能な認証方法など、現在のユーザーに関する情報を提供します。

  ```jsx Example theme={null}
  import { useUser } from '@auth0/auth0-acul-react/organization-selection';
  function UserProfile() {
    const user = useUser();
  }
  ```
</ParamField>

<ParamField body="useOrganizationSelection" type={<a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/OrganizationSelectionMembers">OrganizationSelectionMembers</a>}>
  このフックは、`organization-selection` 画面で使用できるすべてのメソッドとコンテキストを返します。
</ParamField>

<div id="methods">
  ## メソッド
</div>

<ParamField body="continueWithOrganizationName" type="Promise<void>">
  このメソッドは、ユーザーが入力した組織名を送信し、認証フローを続行します。

  ```jsx Example theme={null}
  import { useOrganizationSelection } from '@auth0/auth0-acul-react/organization-selection';

  function ContinueButton() {
    const { continueWithOrganizationName } = useOrganizationSelection();
    return (
      <button onClick={() => continueWithOrganizationName({ organizationName: 'my-org' })}>
        Continue
      </button>
    );
  }
  ```

  **メソッド パラメーター**

  <Expandable title="パラメーター">
    <ParamField body="options">
      [ContinueWithOrganizationNameOptions](/ja/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/ContinueWithOrganizationNameOptions).
    </ParamField>

    <ParamField body="organizationName" type="string" required>
      続行に使用する組織名。
    </ParamField>
  </Expandable>
</ParamField>

<div id="commonutility-hooks">
  ## 共通/ユーティリティフック
</div>

<ParamField body={<a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Hooks/useAuth0Themes">useAuth0Themes</a>} type="Hooks">
  このフックは、ブランディングコンテキストからフラット化された設定を含む現在のテーマオプションを取得します。
</ParamField>

<ParamField body={<a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Hooks/useChangeLanguage">useChangeLanguage</a>} type="Hooks">
  このフックは、現在の ACUL 画面の表示言語を変更するための関数を返します。
</ParamField>

<ParamField body={<a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Hooks/useCurrentScreen">useCurrentScreen</a>} type="Hooks">
  このフックは、現在の画面のコンテキストと state を取得します。
</ParamField>

<ParamField body={<a href="/ja/docs/libraries/acul/react-sdk/API-Reference/Hooks/useErrors">useErrors</a>} type="Hooks">
  このフックは、画面上のサーバー、クライアント、開発者のエラーを読み取り、管理します。
</ParamField>
