DirectoryServiceData / Client / list_groups_for_member

list_groups_for_member#

DirectoryServiceData.Client.list_groups_for_member(**kwargs)#

Returns group information for the specified member.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the ListGroupsForMember.NextToken member contains a token that you pass in the next call to ListGroupsForMember. 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_groups_for_member(
    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 member.

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

  • MemberRealm (string) –

    The domain name that’s associated with the group member.

    Note

    This parameter is optional, so you can limit your results to the group members in a specific domain.

    This parameter is case insensitive and defaults to Realm

  • 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 groups outside of your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD groups are returned.

    This value is case insensitive and defaults to your Managed Microsoft AD domain.

  • SAMAccountName (string) –

    [REQUIRED]

    The SAMAccountName of the user, group, or computer that’s a member of the group.

Return type:

dict

Returns:

Response Syntax

{
    'DirectoryId': 'string',
    'Groups': [
        {
            'GroupScope': 'DomainLocal'|'Global'|'Universal'|'BuiltinLocal',
            'GroupType': 'Distribution'|'Security',
            'SAMAccountName': 'string',
            'SID': 'string'
        },
    ],
    'MemberRealm': 'string',
    'NextToken': 'string',
    'Realm': 'string'
}

Response Structure

  • (dict) –

    • DirectoryId (string) –

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

    • Groups (list) –

      The group information that the request returns.

      • (dict) –

        A structure containing a subset of fields of a group object from a directory.

    • MemberRealm (string) –

      The domain that’s associated with the member.

    • NextToken (string) –

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

    • Realm (string) –

      The domain that’s associated with the group.

Exceptions