---
schema_version: "1"
id: dd4d5482f51a70a2e7ebad20b51b0c2ad6e58d599db99be8ae276e5585e168e3
title: 適用於 Snowflake 的外部 OAuth
collection: tableau
version: current
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/current/zh-tw/online/snowflake_oauth_idp.md
canonical_url: https://help.tableau.com/current/online/zh-tw/snowflake_oauth_idp.htm
source_site: help.tableau.com
content_type: documentation
content_hash: f44dd62ca929128b9f689f2899d3a021b99571a5a1dc8a08c694770324e1db12
description: Configure external OAuth to federate identity from an IdP to Snowflake.
---
[跳至主要內容](#main-content)

# 適用於 Snowflake 的外部 OAuth

從 Tableau 2024.3 開始，可以使用 OAuth 2.0/OIDC 將外部身分提供程式的身分與 Snowflake 結成同盟。

根據身分提供程式的不同，設定整合需要執行不同的步驟。這是一個高層級的概觀，旨在指導設定，而不提供在身分提供程式文件中找到的必要詳細資訊。假設熟悉設定 OAuth 並了解使用外部身分提供程式設定驗證所需的技術細節。

## 在 Snowflake 上設定 IDP

有關設定 IDP 的詳情，請參閱 Snowflake 的說明系統中的[外部 OAuth 概觀](https://docs.snowflake.com/en/user-guide/oauth-ext-overview)。

## 在 Tableau 上設定 IDP

1. 在適用於 Tableau Desktop 和 Tableau Cloud 或 Tableau Server 的 IDP 上建立 OAuth 用戶端。Desktop 用戶端會啟用 [PKCE](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-pkce)，並使用 `http://localhost` 重新導向。
2. 建立該 Tableau OAuth 設定檔。有關如何執行此動作的詳細資訊，請參閱 [github](https://tableau.github.io/connector-plugin-sdk/docs/oauth) 上的 [OAuth 設定和使用](https://tableau.github.io/connector-plugin-sdk/docs/oauth)以及[此處](https://github.com/tableau/connector-plugin-sdk/tree/master/samples/components/oauth)的範例。我們歡迎其他 IDP 的範例。
    
    - 請務必在 Tableau OAuth 設定 ID 前面加上「custom\_」前置詞。
        
        **附註：**OAuth 設定 ID 不得超過 36 個字元。超過此長度的 ID 可能不會產生錯誤，但會無法運作。
    - 如果 IDP 支援動態 localhost 連接埠，則停用 `OAUTH_CAP_FIXED_PORT_IN_CALLBACK_URL`。若您的 IDP 不支援此功能，請確保在設定檔和 IDP 允許清單中加入多組 localhost 回呼 URL。
3. 在與桌面主機（Tableau Desktop、Tableau Prep Builder、Tableau Bridge）以及將透過站台設定頁面使用 OAuth 的每個 Tableau Server 和 Tableau Cloud 站台上的每個應用程式關聯的 OAuthConfigs 資料夾中安裝新的 Tableau OAuth 設定檔。有關詳情，請參閱 [Desktop 上的自訂 OAuth 設定](https://tableau.github.io/connector-plugin-sdk/docs/oauth#custom-oauth-configs-on-desktop) 和 [站台層級 OAuth 用戶端](https://tableau.github.io/connector-plugin-sdk/docs/oauth#site-level-oauth-clients)。

## 連線到 Snowflake

連線時，必須選取 OAuth 並選擇先前安裝的 OAuth 設定。

![](/tableau/current/zh-tw/online/zh-tw/Img/snowflake_connect_oauth.png)

## Okta

若使用 Okta，最好使用「自訂授權伺服器」，而不是「組織授權伺服器」。自訂授權伺服器具有更多彈性。系統會預設建立一個自訂授權伺服器，稱為「預設」。授權 URL 應如下所示：

`https://${yourOktaDomain}/oauth2/{authServerName}/v1/authorize`

![Okta 儀表板](/tableau/current/zh-tw/online/zh-tw/Img/athena_okta.png)