3

I have a problem with user logon. In front of a logon name I have i:0#.w| and then I have a login name. How to get just the login name? Because this is i:0#.w| appearing everywhere in Info Path, in Excel and many more. How can I get rid of it from Central Administration of Sharepoint ?

8

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;
    else
        username = usernameString;
}
2

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.

  • Thanks a lot for the answers. This is a very strange disadventage with a ,igration tooo. – Grzegorz Z Aug 27 '14 at 10:45
  • 1
    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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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