Contact.PrincipalTypeIsSPUser method (SPPrincipalType)
Checks whether a principal is a user or a security group in Microsoft Windows SharePoint Services.
Namespace: Microsoft.Office.Workflow.Utility
Assembly: Microsoft.Office.Workflow.Tasks (in Microsoft.Office.Workflow.Tasks.dll)
Syntax
'Declaration
Public Shared Function PrincipalTypeIsSPUser ( _
principalType As SPPrincipalType _
) As Boolean
'Usage
Dim principalType As SPPrincipalType
Dim returnValue As Boolean
returnValue = Contact.PrincipalTypeIsSPUser(principalType)
public static bool PrincipalTypeIsSPUser(
SPPrincipalType principalType
)
Parameters
principalType
Type: Microsoft.SharePoint.Utilities.SPPrincipalTypeType of principal, for example, a user, a distribution list (DL), a SharePoint group, a security group, and so on.
Return value
Type: System.Boolean
If true, the principal is a user of Microsoft Windows SharePoint Services; otherwise, false.
Remarks
An individual user (SPUser) gains access to a Windows SharePoint Services object directly through an individual role assignment, or indirectly through membership in either a domain group or a SharePoint group (SPGroup) that has a role assignment. In a direct role assignment, the user is the principal (SPPrincipal), while in a domain group or SharePoint group role assignment, the domain group or SharePoint group is the principal.
For more information about principal, see Authorization object relations and object model topic in the Microsoft Windows SharePoint Services 3.0 SDK. For more information about principal types, see the SPPrincipalType enumeration in the Microsoft Windows SharePoint Services 3.0 SDK.
For an example of how to use some of the members in the Contact class, see the example in ExpandGroups method.