---
schema_version: "1"
id: 5647085313234a0f61929d061fdb6888d220909a10d7a1c143a8cd0ddaaa6d08
title: 無效使用者（SharePoint 或 C#）
collection: tableau
version: current
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/current/zh-tw/server/trusted_auth_trouble_invaliduser.md
canonical_url: https://help.tableau.com/current/server/zh-tw/trusted_auth_trouble_invaliduser.htm
source_site: help.tableau.com
content_type: documentation
content_hash: b4933e55f547a6f532dfcdc697b5817a2b78e4d83940ccc006a3544ed183f754
description: Resolve the Invalid User error in SharePoint or C# trusted authentication.
---
[跳至主要內容](#main-content)

# 無效使用者（SharePoint 或 C#）

如果您將 Tableau Server 設定為使用受信任的驗證，則可能會遇到此錯誤。

SharePoint .dll 的範例代碼引用以下 GET 請求：

SPContext.Current.Web.CurrentUser.Name

上面的請求將返回當前 Windows Active Directory 使用者的顯示名稱。如果要使用登入 ID，則需要將代碼變更為：

SPContext.Current.Web.CurrentUser.LoginName

進行變更後，請重新編譯 SharePoint .dll。