SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

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

If I look at HttpContext.Current.User.Identity.Name I get values that map to what I see in the content database in UserInfo.tp_Login.

Since I have enabled both Windows Authentication and Forms Based Authentication (claims) in my SharePoint 2010 web application I see values like the following for UserInfo.tp_Login.


For example:


Is there a good guide as to what the valid formats are here? I need to parse this information unless there is something handy function that I can use. I checked SPUtility and SPUtility.GetAccountName didn't seem to help.

I'm pretty sure that the "w" in "i:0#.w" means Windows and the "f" in "i:0#.f" means Forms, but I'm wondering if there is an enumerated list of possibilities somewhere.

share|improve this question
The good news is that AD users apparently cannot have a "\" or a "|" in the account name, so I may just be able to use those as a delimiter. – Kirk Liemohn Jun 8 '11 at 2:33
up vote 2 down vote accepted

Check out

Yes, there's a handy function

share|improve this answer
Perfect. It doesn't quite explain all the pieces and parts, but it does provide code for parsing it. It will be interesting to see if it works with non-claims accounts (I suspect not). – Kirk Liemohn Jun 8 '11 at 12:21
I see that there is a SPClaimProviderManager.IsClaimsUser() method which should help. – Kirk Liemohn Jun 8 '11 at 14:11

There is an explanation in the whitepaper "Implementing Claims-Based Authentication with SharePoint Server 2010". You can download it here.

On page 62, "Claims Encoding", you read:

w/m/r/t/p/s = Original Issuer Type -> w = windows, m = membership, r = role, t = trusted STS, p = personal card, s= local sts claim

The rest of the string is explained too.

Update: I just found a full description on technet.

share|improve this answer

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.