---
schema_version: "1"
id: 90e4f0b3634c104a39144320f4bfd49cde16b22def757fce64248197883d5d5e
title: Invalid User (SharePoint or C#)
collection: tableau
version: current
locale: en-gb
portal_url: https://docs.salesforce.com/tableau/current/en-gb/server/trusted_auth_trouble_invaliduser.md
canonical_url: https://help.tableau.com/current/server/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.