Export (0) Print
Expand All

UserProfileManager.GetStringSinglePropertyValueForUser method

Retrieves the single-valued property for the UserProfile whose name matches the propertyName parameter of the UserProfile identified by the accountName parameter.

Namespace:  Microsoft.Office.Server.UserProfiles
Assembly:  Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)

public static string GetStringSinglePropertyValueForUser(
	SPServiceContext serviceContext,
	string propertyName,
	string accountName
)

Parameters

serviceContext
Type: Microsoft.SharePoint.SPServiceContext

The set of UserProfile objects to search for the specified account name.

propertyName
Type: System.String

The name of the UserProfile property to retrieve from the current UserProfile.

accountName
Type: System.String

The account name of the requested user profile.

Return value

Type: System.String
A string representing a single-valued property.

ExceptionCondition
ArgumentNullException

serviceContext is a null reference (Nothing in Visual Basic).

accountName is a null reference (Nothing in Visual Basic).

InvalidOperationException

propertyName is a null reference (Nothing in Visual Basic) or an empty string.

accountName is a null reference (Nothing in Visual Basic) or an empty string.

Show:
© 2015 Microsoft