ManagementAuthorization.GetAuthorizedUsers Method

Definition

Retrieves a collection of authorized users for the specified configuration path.

public:
 static Microsoft::Web::Management::Server::ManagementAuthorizationInfoCollection ^ GetAuthorizedUsers(System::String ^ configurationPath, bool includeChildren, int itemIndex, int itemsPerPage);
public static Microsoft.Web.Management.Server.ManagementAuthorizationInfoCollection GetAuthorizedUsers (string configurationPath, bool includeChildren, int itemIndex, int itemsPerPage);
static member GetAuthorizedUsers : string * bool * int * int -> Microsoft.Web.Management.Server.ManagementAuthorizationInfoCollection
Public Shared Function GetAuthorizedUsers (configurationPath As String, includeChildren As Boolean, itemIndex As Integer, itemsPerPage As Integer) As ManagementAuthorizationInfoCollection

Parameters

configurationPath
String

The configuration path.

includeChildren
Boolean

true to include in the returned collection all authorized users who are in child elements of the path specified in the configurationPath parameter; otherwise, false.

itemIndex
Int32

The index of the first ManagementAuthorizationInfo object to be displayed.

itemsPerPage
Int32

The maximum number of additional ManagementAuthorizationInfo objects to display after the one specified in the itemIndex parameter.

Returns

A ManagementAuthorizationInfoCollection object that contains ManagementAuthorizationInfo objects for each authorized user.

Examples

The following example demonstrates the GetAuthorizedUsers method. This code example is part of a larger example provided for the ManagementAuthorization class.

// Get a collection of authorized users.
ManagementAuthorizationInfoCollection authorizedCollection =
    ManagementAuthorization.GetAuthorizedUsers(path, true, 0, -1);
message = "\nAuthorizedUsers count: " +
    authorizedCollection.Count.ToString() + "\n  ";

Remarks

This method returns a collection of authorized users for the specified configuration path. The collection starts with the itemIndex parameter value and contains the number of objects specified by the itemsPerPage parameter. Set itemsPerPage to -1 to retrieve all the ManagementAuthorizationInfo objects beyond the itemIndex parameter value. This method retrieves the specified collection from the full list of users on the IIS Manager Permissions page in IIS Manager.

Applies to