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