Export (0) Print
Expand All
Expand Minimize

SPUtility.GetUserKeyFromUserName method

SharePoint 2013

Gets the user stable identifier, user key, from the userName.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static string GetUserKeyFromUserName(
	string userName
)

Parameters

userName
Type: System.String

The full user name such as you obtain from [!:SPClaimProviderManager.GetUserIdentifierEncodedClaim(IIdentityidentity)]

Return value

Type: System.String
The user key for the input.

ExceptionCondition
ArgumentNullException

If userName is null.

ArgumentException

If userName is empty.

SPException

If userName is too large or is a not a claims style user name.

Reference

[!:SPWebService.ContentService.MembershipUserKeyType]
Show:
© 2014 Microsoft