Share via


Contact.FromPrincipal method (SPPrincipal)

Gets a Contact object for a given principal object.

Namespace:  Microsoft.Office.Workflow.Utility
Assembly:  Microsoft.Office.Workflow.Tasks (in Microsoft.Office.Workflow.Tasks.dll)

Syntax

'Declaration
Public Shared Function FromPrincipal ( _
    principal As SPPrincipal _
) As Contact
'Usage
Dim principal As SPPrincipal
Dim returnValue As Contact

returnValue = Contact.FromPrincipal(principal)
public static Contact FromPrincipal(
    SPPrincipal principal
)

Parameters

Return value

Type: Microsoft.Office.Workflow.Utility.Contact
A Contact object for the principal.

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 objects, see Authorization object relations and object model in the Microsoft Windows SharePoint Services 3.0 SDK.

For an example of how to use the FromPrincipal method, see the example in ExpandGroups method.

See also

Reference

Contact class

Contact members

FromPrincipal overload

Microsoft.Office.Workflow.Utility namespace