--- title: "ユーザーの有効化または無効化" url: https://docs.catalyst.zoho.com/ja/sdk/python/v1/cloud-scale/authentication/enable-disable-user/ description: "このページでは、Pythonアプリケーションでユーザーを有効化または無効化する方法について、サンプルコードスニペットとともに説明します。" last_updated: 2026-03-30T08:10:30Z service: Cloud Scale type: general related_links: - name: "Authentication Help" url: /ja/cloud-scale/help/authentication/introduction - name: "Enable or Disable a User in the Console" url: /ja/cloud-scale/help/authentication/user-management/users/implementation/#enable-or-disable-a-user - name: "SDK Scopes" url: /ja/sdk/python/v1/sdk-scopes --- # ユーザーの有効化または無効化 Catalystでは、いつでもユーザーを[無効化または有効化](https://docs.catalyst.zoho.com/ja/cloud-scale/help/authentication/user-management/users/implementation/#enable-or-disable-a-user)できます。無効化されたユーザーはアプリケーションにサインアップされたままですが、アプリケーションにアクセスすることはできません。 以下のSDKスニペットは、`update_user_status(userId, user_status)`メソッドを使用してエンドユーザーを有効化および無効化する方法を示しています。 ユーザーは一意の[User ID](https://docs.catalyst.zoho.com/ja/cloud-scale/help/authentication/user-management/users/introduction/)で参照されます。すべてのユーザーのUser IDは、Authenticationコンポーネントの*Users* > [*User Management*](https://docs.catalyst.zoho.com/ja/cloud-scale/help/authentication/user-management/introduction/)セクションに移動して確認できます。 以下で使用されているコンポーネントインスタンス`authentication_service`の詳細については、[こちらのセクション](https://docs.catalyst.zoho.com/ja/sdk/python/v1/cloud-scale/authentication/get-component-instance/)を参照してください。 ### ユーザーの有効化 **使用するパラメータ**
パラメータ名 データ型 定義
`userId` String **必須**パラメータです。アプリケーションで有効化するユーザーのUserIDを保持します。
`user_status` String **必須**パラメータです。デフォルト値"enable"を保持します。
```python authentication_service = app.authentication() user_details = authentication_service.update_user_status('6759000000124659', 'enable') # ユーザーIDを置き換える ``` ### ユーザーの無効化 **使用するパラメータ**
パラメータ名 データ型 定義
`userId` `String` **必須**パラメータです。アプリケーションで無効化するユーザーのUserIDを保持します。
`user_status` `String` **必須**パラメータです。デフォルト値"disable"を保持します。
```python authentication_service = app.authentication() user_details = authentication_service.update_user_status('6759000000124659', 'disable') # ユーザーIDを置き換える ``` > **情報:** 上記の操作を実行するために必要な権限レベルについては、[SDKスコープの表](https://docs.catalyst.zoho.com/ja/sdk/python/v1/sdk-scopes)を参照してください。