Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetRoleDefinitionFromLegacyWebGroupId method
Collapse the table of content
Expand the table of content

SPUtility.GetRoleDefinitionFromLegacyWebGroupId method

Gets the role definition for the web group with the specified ID from the specified collection of role definitions.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static SPRoleDefinition GetRoleDefinitionFromLegacyWebGroupId(
	SPRoleDefinitionCollection roles,
	int webGroupId


Type: Microsoft.SharePoint.SPRoleDefinitionCollection

The collection of role definitions.

Type: System.Int32

The web group ID to get the role definition.

Return value

Type: Microsoft.SharePoint.SPRoleDefinition
The role definition for the web group.


The role definition cannot be found for the web group.

This method gets the role definition for the web group with the ID specified by the webGroupId parameter from the role definition collection specified by the roles parameter.

© 2015 Microsoft