GetUserAudienceIDs(String) Method

The GetUserAudienceIDs method of the AudienceManager class gets a list of audience globally unique identifiers (GUIDs) for the specified user name.

Parameters

AccountNameOrg   Microsoft Windows NT account name of a user. Contains both the domain and the user name. For example, Domain\user_name.

Return Value

System.Collections.ArrayList   List of GUIDs for audiences for the specified user name.

Exceptions

Exception Type Condition
AudienceNoContentException Error occurred while getting audience information for this user from the database.

Remarks

The GetUserAudienceIDs method retrieves account information for the user with the specified Windows NT user name. Account information such as user name and domain are used to retrieve audience information from the database.

Example

The following code example shows how to use the GetUserAudienceIDs method to retrieve and list GUIDs for the audiences to which the specified user belongs.

Requirements

Platforms: Windows Server 2003

Security: Code Access Security

Microsoft.SharePoint.Portal.Audience Namespace