[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Enable IAP using a Google-managed OAuth client\n\nThis page describes how to enable Identity-Aware Proxy (IAP) for\na Google Cloud resource, using a Google-managed\nOAuth client.\n\nWhen enabling IAP on a resource using a Google-managed\nOAuth client, only users within the organization in which the resource is\ncontained can access that resource. If you want to allow users outside of\nthe organization access to an IAP-enabled resource, [enable\ncustom OAuth credentials](#custom-oauth-credentials).\n\nEnable IAP for a new resource\n-----------------------------\n\nNew Google Cloud resources don't have IAP enabled.\nComplete the following steps to enable IAP on a new resource.\n\n1. In the Google Cloud console, go to the IAP page.\n\n\n [Go to the IAP page](https://console.cloud.google.com/security/iap)\n2. Click the **Applications** tab.\n\n3. From the list of resources, select the resource for which you want to enable\n IAP.\n\n4. In the **IAP** column, click the toggle to the on position.\n\n5. For the **Turn on IAP** option, click **Turn on**.\n\nSet up custom OAuth credentials for a resource\n----------------------------------------------\n\nTo allow users outside of the organization access to an\nIAP-enabled resource, complete the following steps.\n\n1. In the Google Cloud console, go to the IAP page.\n\n\n [Go to the IAP page](https://console.cloud.google.com/security/iap)\n2. Click the **Applications** tab.\n\n3. In the list of resources, go to the settings of the resource for which you\n want to configure custom OAuth credentials.\n\n4. Select the **Enable custom OAuth credentials to allow users outside of this\n organization to access this application** checkbox.\n\n5. In the **OAuth configuration** dialog, enter a client ID and secret.\n\n6. Optional: To have a client ID and secret generated for you, click\n **Auto generate credentials**.\n\n You can download the client credentials to a CSV file, or delete the\n credentials. After you save your changes, custom client credentials cannot\n be retrieved, so we recommend that you save your credentials.\n\n If you delete the credentials, the auto-generated OAuth client\n is also deleted.\n7. To save your changes, Click **Save**. Saving your changes does not change\n the IAP enabled state.\n\nChange to a Google-managed OAuth client\n---------------------------------------\n\nYou can change resources using a custom OAuth client to use a Google-managed\nOAuth client by completing the following steps.\n\n1. In the Google Cloud console, go to the IAP page.\n\n\n [Go to the IAP page](https://console.cloud.google.com/security/iap)\n2. Click the **Applications** tab.\n\n3. In the list of resources, go to the settings of the resource for which you\n want to change to use a Google-managed OAuth client.\n\n4. Deselect the **Enable custom OAuth credentials to allow users outside of this\n organization to access this application** checkbox.\n\n5. Click **Save**."]]