Hi,
How to check if user account id (domain\username) is already converted to claims account?
I have tried the below code:
SPClaimProviderManager ClaimManager = SPClaimProviderManager.Local; if (ClaimManager != null) { try {
string strUserLanID;
SPClaim claim = new SPClaim(SPClaimTypes.UserLogonName, strUserLanID, "http://www.w3.org/2001/XMLSchema#string", SPOriginalIssuers.Format(SPOriginalIssuerType.Windows)); strUserLanID = ClaimManager.EncodeClaim(claim); } catch (Exception ex) { } }
If the strUserLanID is of type "domain\username", the above code works, but if the strUserLanID is of type "i:0#.w|domain\username", then i get the error as username is not unique. How to check if the userid is already in claims mode?
Thanks