GetUserAudienceIDs Method

The GetUserAudienceIDs method of the AudienceManager class gets a list of globally unique identifiers (GUIDs) for the audiences to which the current user belongs.

Return Value

System.Collections.ArrayList List of GUIDs for audiences to which the current user belongs.

Exceptions

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

Remarks

The GetUserAudienceIDs method identifies the current user by retrieving the security identifier (SID) for the current user from Microsoft Windows Server 2003. Account information such as Windows NT 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 audiences to which the current user belongs.

Requirements

Platforms: Windows Server 2003

Security: Code Access Security

Microsoft.SharePoint.Portal.Audience Namespace