SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have got a problem, with user logon. Befor a logon name I have got i:0#.w| and next i xave got a loigin name. How to get only Login name ? Because this i:0#.w| I have got everywere in info Path, In Excel and many more. How Could I get it of from Central Administration of Sharepoint ?

share|improve this question
up vote 8 down vote accepted

Your web application is using claims based authentication and you can't get rid of that part from Central Administration unless you use a classic based authentication for a web application (in SP 2013 that is possible only using PowerShell when creating a new web application).

To remove that part from the user names in InfoPath, Excel, etc. you have to split the string and get only DOMAIN\Username.

When coding you can use the following snippet:

SPClaimProviderManager claimsManager = SPClaimProviderManager.Local;

if (claimsManager != null)
    if (SPClaimProviderManager.IsEncodedClaim(usernameString))
        username = claimsManager.DecodeClaim(usernameString).Value;
        username = usernameString;
share|improve this answer

I faced the same situation and the only thing I could find was splitting the string and take only the user name. So the solution is sub string.

Fore more info check this.

share|improve this answer
Thanks a lot for the answers. This is a very strange disadventage with a ,igration tooo. – Grzegorz Z Aug 27 '14 at 10:45
Malin, the link you posted is dead now. Please update your response. – Falak Mahmood Jun 2 '15 at 13:46
@malin-de-silva , the link you posted is dead now. Please update your response – saber tabatabaee yazdi Oct 16 '15 at 18:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.