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

This article how to limit a read on a user in BCS, but we can't find the correct syntax for fba-users. (MS Quote: If the login mode for the user is claims-based, then the value passed is the unique value that identifies the user (for example, membership: username,

So we asked ourselves how to write qualifiedusername behind the scenes with @Username in a create part of BCS (and see what it wrote). But we couldn't find a way for that either. Thanks in advance. Rob

share|improve this question

1 Answer 1

Given a login name (SPContext.Current.Web.CurrentUser.LoginName) of "i:0#.f|fbaprovider|user" the following will result in "user"

string result = LoginName;
if (Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.IsEncodedClaim(LoginName))
    result = Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.Local.DecodeClaim(LoginName).Value;
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.