---
schema_version: "1"
id: c341c8e2f7ea4e1bf525a2109f33dee32ff4a611c08cadf27ad4536106859f4a
title: OpenID Connect 疑难解答
collection: tableau
version: current
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/current/zh-cn/server-linux/openid_auth_troubleshooting.md
canonical_url: https://help.tableau.com/current/server-linux/zh-cn/openid_auth_troubleshooting.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 6e26554f2db991653a0780416d5510759d6e4698d5d703528411b8633081b02e
description: Troubleshoot OpenID Connect sign-in and configuration issues in Tableau Server.
---
[跳转到主要内容](#main-content)

# OpenID Connect 疑难解答

使用以下主题在 Tableau Server 中排查 OpenID Connect (OIDC) 问题。

许多身份提供程序支持 OIDC 协议。OIDC 协议是一个开放和灵活的标准，因此，并非所有标准实现都是相同的。管理员在为 OIDC 配置 Tableau Server 时遇到的大多数问题是不同身份提供程序实现 OIDC 的结果。如果您在设置 OIDC 以及 Tableau Server 时遇到错误，我们建议您使用 IdP 来解决它们。

## 启用增强的 OpenID 日志记录

为了有效地解决 Tableau Server 中的 OpenID Connect 问题，请使用以下 TSM 命令将日志记录级别设置为调试，并使用 `vizportal.openid.full_server_request_logging_enabled` 配置键将 OpenID 的完整日志记录设置为 `true`，从而启用增强的日志记录：

`tsm configuration set -k vizportal.log.level -v debug`

`tsm configuration set -k vizportal.openid.full_server_request_logging_enabled -v true`

`tsm pending-changes apply`

完成故障排除后，我们建议将两个配置键的值设置回其默认值，以限制在日志中收集的信息并减少日志文件大小。有关将配置键重置为默认值的详细信息，请参见[将配置键重置为默认值](https://help.tableau.com/current/server-linux/zh-cn/cli_configuration-set_tsm.htm#Reset2Default)。

**注意：**不支持[身份池](https://help.tableau.com/current/server-linux/zh-cn/identity_pools.htm)的增强日志记录。不过，支持 `vizportal.log.level debug` 日志记录。

## 从命令行登录

即使 Tableau Server 配置为使用 OIDC，但如果您使用 [tabcmd](https://help.tableau.com/current/server-linux/zh-cn/tabcmd.htm)、[REST API](https://help.tableau.com/current/api/rest_api/en-us/help.htm) 或 [Tableau 数据提取命令行实用工具](https://help.tableau.com/current/pro/online/zh-cn/help.htm)（随 Tableau Desktop 提供）登录 Tableau Server，也不会使用 OIDC。

## 登录失败

登录可能会失败，并出现以下消息：

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

此错误通常意味着 Tableau Server 中存储的用户名与 IdP 提供的用户名之间存在不匹配。若要修复此错误，请确保这些用户名匹配。例如，如果 Jane Smith 的用户名在 IdP 中存储为 `jsmith` ，那么它在 Tableau Server 中也必须存储为 `jsmith`。

## 错误 69："无法登录“

当您尝试使用 Web 浏览器登录 Tableau Server 并收到错误时，可能会返回错误 69，“无法登录”。登录失败。请与 Tableau Server 管理员联系。" 返回此消息的 URL 是 `https://example.com/#/error/signin/69?redirectPath=%2`。

如果遇到此错误，请咨询 IDP 提供商，验证 IdP 是否需要 `client_secret_post`，而不是 `client_secret_basic`（Tableau 默认值）。

如果 IdP 需要 `client_secret_post`，则必须将 `vizportal.openid.client_authentication` 参数设置为 `client_secret_post`。

举例来说，如果收到此错误并且已针对 Salesforce IdP 配置了 OIDC，则必须设置 `vizportal.openid.client_authentication` 参数。

有关详细信息，请参见[tsm configuration set 选项](https://help.tableau.com/current/server-linux/zh-cn/cli_configuration-set_tsm.htm)。

## OpenID 错误日志

OpenID 身份验证在 Tableau Server 外部进行，因此，排查身份验证问题可能很困难。但是，Tableau Server 会记录登录尝试。可以创建日志文件的快照，并使用它们来排查问题。有关详细信息，请参见[Tableau Server 日志和日志文件位置](https://help.tableau.com/current/server-linux/zh-cn/logs_loc.htm)。

**注意**：若要记录 OpenID 相关事件，必须使用[tsm configuration set 选项](https://help.tableau.com/current/server-linux/zh-cn/cli_configuration-set_tsm.htm)将 `vizportal.log.level` 设置为 `debug`。

在未解压的日志文件快照内的以下文件中，检查 OpenID 错误：

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

## 找不到用户

如果用户首次登录后“子”声明已更改，则可能会返回错误“找不到用户”。如果您在 vizportal 日志中看到以下内容，则可以验证此问题：`Possible conflicting or stale account: <username> A different user already owns this account` 。

如果仍然出现此问题，请重置该用户或 Tableau Server 上所有用户的“子”声明。有关详细信息，请参见[重置用户标识符](https://help.tableau.com/current/server-linux/zh-cn/openid_auth_changing_idp.htm#reset_sub)。