---
schema_version: "1"
id: dcfca71f07887a0bd23cb0b9031256fad0c809952b16ab0db79c5c3ecf921f48
title: SAML 疑難排解
collection: tableau
version: current
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/current/zh-tw/server-linux/saml_trouble.md
canonical_url: https://help.tableau.com/current/server-linux/zh-tw/saml_trouble.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 430c0e5b0a44e083576f3529dc48fdce644070224fcfc329edcd38a397aa1e89
description: Troubleshoot SAML authentication issues in Tableau Cloud.
---
[跳至主要內容](#main-content)

# SAML 疑難排解

本主題提供相關資訊，說明解決在設定 SAML 驗證時可能發生的問題。

## SAML 和啟用自動登入

如果您使用 SAML 且 Tableau Server 還設定為使用 Active Directory，請不要同時選取「啟用自動登入」。「啟用自動登入」和 SAML 不能同時在同一伺服器安裝上使用。

## 設定 SAML 時出現 HTTP 狀態 500 錯誤

在某些情況下，啟用 SAML 並在瀏覽器中巡覽到 Tableau Server URL 之後，您可能會收到 HTTP 狀態 500 錯誤並看到以下錯誤：

`org.opensaml.saml2.metadata.provider.MetadataProviderException: User specified binding is not supported by the Identity Provider using profile urn:oasis:names:tc:SAML:2.0:profiles:SSO:browser`

為了說明解決此錯誤，請確保以下各項：

- 在「SAML」索引標籤中指定的 SSO 設定檔的 IdP URL 正確無誤。
- 在 IdP 中建立服務提供者時提供的 SSO 設定檔的 IdP URL 正確無誤。
- IdP 設定為使用 `HTTP-POST` 請求。（不支援重定向和 SOAP。）

如果任何這些設定不正確，請進行適當的更新，然後再次執行 SAML 設定步驟，從透過 Tableau Server 生產和匯出 XML 中繼資料文件開始。

如果這些設定正確無誤，但您仍然看到錯誤，請檢查 Tableau Server 和 IdP 生產的中繼資料 XML，如 [SAML 要求](https://help.tableau.com/current/server-linux/zh-tw/saml_requ.htm)中所述。

## 使用命令列登入

當您使用 [tabcmd](https://help.tableau.com/current/server-linux/zh-tw/tabcmd.htm) 或 [Tableau 資料擷取命令列公用程式](https://help.tableau.com/current/pro/desktop/zh-tw/extracting_TDE.htm)（Tableau Desktop 隨附）登入到 Tableau Server 時，SAML 不用於進行驗證，即使將 Tableau Server 設定為使用 SAML 也不例外。這些工具要求在最初安裝 Tableau Server 時設定驗證（本機驗證或 AD）。

## 登入失敗：找不到使用者

登入失敗，並出現以下訊息：

`>Login failure: Identity Provider authentication successful for user <username from IdP>. Failed to find the user in Tableau Server.`

此錯誤通常意味著 Tableau Server 中存儲的使用者名與 IdP 提供的使用者名之間存在不相符。若要修復此錯誤，請確保這些使用者名相符。例如，如果史珍妮的使用者名在 IdP 中存儲為 `jsmith`，那麼它在 Tableau Server 中也必須存儲為 `jsmith`。

## 登入失敗：SSL 卸載

登入失敗，並出現以下訊息：

`Unable to Sign In - Invalid username or password.`

此外，vizportal 記錄檔（設為 `debug` 模式）包含下列訊息：

`DEBUG com.tableau.core.util.RemoteIP - Found header null in X-FORWARDED-PROTO`

**附註：**若要記錄 SAML 相關事件，`vizportal.log.level` 必須設定為 `debug`。有關詳情，請參閱[變更記錄層級](https://help.tableau.com/current/server-linux/zh-tw/logs_debug_level.htm)。

這個訊息組合指出，卸載連線至 Tableau Server 的 SSL 的外部 Proxy 伺服器，其設定不當。若要解決此問題，請參閱[設定全伺服器的 SAML](https://help.tableau.com/current/server-linux/zh-tw/config_saml.htm)

## SAML 錯誤記錄

SAML 驗證在 Tableau Server 外部進行，因此，排查驗證問題可能很困難。但是，Tableau Server 會記錄登入嘗試。可以建立記錄檔案的快照，並使用它們來排查問題。有關詳情，請參閱[記錄檔快照（將記錄封存）](https://help.tableau.com/current/server-linux/zh-tw/logs_archive.htm)。

**附註：**要記錄 SAML 相關事件，必須將 `vizportal.log.level` 設定為 `debug`。有關詳情，請參閱[變更記錄層級](https://help.tableau.com/current/server-linux/zh-tw/logs_debug_level.htm)。

在未解壓的記錄檔案快照內的以下檔案中，檢查 SAML 錯誤：

`\vizportal\vizportal-<n>.log`

應用程式處理序 (vizportal.exe) 處理驗證，因此 SAML 回應由該處理序記錄。

## 末尾斜杠

在「SAML」索引標籤上，確認「Tableau Server 返回 URL」的末尾沒有斜杠

正確：**http://tableau\_server**

錯誤：http://tableau\_server/

## 確認連線能力

確認您設定的 Tableau Server 具有可路由的 IP 位址，或者在防火牆上具有允許直接與伺服器雙向通訊的 NAT。

若要測試連線，可以在 Tableau Server 上執行 telnet，並嘗試與 SAML IdP 進行連線。例如：`C:\telnet 12.360.325.10 80`

以上測試應連線到 IdP 上的 HTTP 埠 (80)，而且您應收到 HTTP 標頭。

## 多個網域

在「SAML」索引標籤上，將 Tableau Server Domain 屬性留空，以確定其可以在 `domain\username` SAML 判斷提示中的格式。

正確：<empty>

不正確：yourdomain.com