SPUtility.GetPrincipalsInGroup method
SharePoint 2013
Gets users or groups that belong to the specified group. The specified group can be a Microsoft Windows security group, an ASP.NET role, or a SharePoint group.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)] [DirectoryServicesPermissionAttribute(SecurityAction.Assert, Unrestricted = true)] public static SPPrincipalInfo[] GetPrincipalsInGroup( SPWeb web, string input, int maxCount, out bool reachedMaxCount )
Parameters
- web
- Type: Microsoft.SharePoint.SPWeb
The Web site for which the current user has the BrowseUserInfo permission.
- input
- Type: System.String
The group to query for.
- maxCount
- Type: System.Int32
The maximum number of members to return.
- reachedMaxCount
- Type: System.Boolean
The information about whether the maximum number of members has been reached.
Return value
Type: []true if there are more members that were not returned; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentNullException | The web or input parameter is null. |
| ArgumentException | The maxCount parameter is less than 0. |