---
schema_version: "1"
id: 3b112b762f323cb7e3816f2516c28d0fbb485db98d9009f5fa930068e7ec94d9
title: Invalid User (SharePoint or C#)
collection: tableau
version: current
locale: en-gb
portal_url: https://docs.salesforce.com/tableau/current/en-gb/server-linux/trusted_auth_trouble_invaliduser.md
canonical_url: https://help.tableau.com/current/server-linux/en-gb/trusted_auth_trouble_invaliduser.htm
source_site: help.tableau.com
content_type: documentation
content_hash: a8554e89ac69635a27ad46d961618367e472f81f6a215f1886485d5be8951956
description: Resolve the Invalid User error in SharePoint or C# trusted authentication.
---
[Skip to main content](#main-content)

# Invalid User (SharePoint or C#)

You may encounter this error if you’ve configured Tableau Server for trusted authentication.

The example code for the SharePoint .dll references the following GET request:

SPContext.Current.Web.CurrentUser.Name

The above request will return the display name of the current Windows Active Directory user. If you want to use the login ID, then you will need to change the code to:

SPContext.Current.Web.CurrentUser.LoginName

After you make the change, recompile the SharePoint .dll.