DirectoryServiceData / Client / list_group_members

list_group_members#

DirectoryServiceData.Client.list_group_members(**kwargs)#

Returns member information for the specified group.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the ListGroupMembers.NextToken member contains a token that you pass in the next call to ListGroupMembers. This retrieves the next set of items.

You can also specify a maximum number of return results with the MaxResults parameter.

See also: AWS API Documentation

Request Syntax

response = client.list_group_members(
    DirectoryId='string',
    MaxResults=123,
    MemberRealm='string',
    NextToken='string',
    Realm='string',
    SAMAccountName='string'
)
Parameters:
  • DirectoryId (string) –

    [REQUIRED]

    The identifier (ID) of the directory that’s associated with the group.

  • MaxResults (integer) – The maximum number of results to be returned per request.

  • MemberRealm (string) –

    The domain name that’s associated with the group member. This parameter defaults to the Managed Microsoft AD domain.

    Note

    This parameter is optional and case insensitive.

  • NextToken (string) – An encoded paging token for paginated calls that can be passed back to retrieve the next page.

  • Realm (string) –

    The domain name that’s associated with the group.

    Note

    This parameter is optional, so you can return members from a group outside of your Managed Microsoft AD domain. When no value is defined, only members of your Managed Microsoft AD groups are returned.

    This value is case insensitive.

  • SAMAccountName (string) –

    [REQUIRED]

    The name of the group.

Return type:

dict

Returns:

Response Syntax

{
    'DirectoryId': 'string',
    'MemberRealm': 'string',
    'Members': [
        {
            'MemberType': 'USER'|'GROUP'|'COMPUTER',
            'SAMAccountName': 'string',
            'SID': 'string'
        },
    ],
    'NextToken': 'string',
    'Realm': 'string'
}

Response Structure

  • (dict) –

    • DirectoryId (string) –

      Identifier (ID) of the directory associated with the group.

    • MemberRealm (string) –

      The domain name that’s associated with the member.

    • Members (list) –

      The member information that the request returns.

      • (dict) –

        A member object that contains identifying information for a specified member.

        • MemberType (string) –

          The AD type of the member object.

        • SAMAccountName (string) –

          The name of the group member.

        • SID (string) –

          The unique security identifier (SID) of the group member.

    • NextToken (string) –

      An encoded paging token for paginated calls that can be passed back to retrieve the next page.

    • Realm (string) –

      The domain name that’s associated with the group.

Exceptions

  • DirectoryServiceData.Client.exceptions.ResourceNotFoundException

  • DirectoryServiceData.Client.exceptions.AccessDeniedException

  • DirectoryServiceData.Client.exceptions.InternalServerException

  • DirectoryServiceData.Client.exceptions.ValidationException

  • DirectoryServiceData.Client.exceptions.DirectoryUnavailableException

  • DirectoryServiceData.Client.exceptions.ThrottlingException