AquaLogic Interaction Development Kit (IDK) 6.0.0 |

# IRole.GetMemberIDs Method

Returns the IDs of members who belong to this role based on the given member type.

int[] GetMemberIDs(
MemberQueryTypes memberType
);

#### Parameters

memberType
  The type of members to retrieve from this role; cannot be `null`.

#### Return Value

An int array of IDs describing users belong to this role based on the given member type.

#### Remarks

This method can be used to retrieve users who are added to a role using `AddMember` with `MemberTypes.User`, or groups that are added to a role using `AddMember` with `MemberTypes.Group`.
Note: Adding a single user to a role is NOT the same as adding a group with one or more users to a role. The ID of a user who is added as a user member type can be retrieved using this method with `MemberQueryTypes.AllUsers`. However, for users belonging to a group that is then added to a role as a group member type, IDs of individual users in the group will NOT be retrievable using `GetMemberIDs` with `MemberQueryTypes.AllUsers`. Instead, `MemberQueryTypes.AllGroups` should be used to retrieve the group ID.

#### Exceptions

Exception Type | Condition
--- | ---
CollaborationException | The method call resulted in an error.
SoapException | There was a communication problem during the execution of the remote method call.

#### See Also

IRole Interface | Plumtree.Remote.PRC.Collaboration.Security Namespace