ldap3.extend.microsoft package

Submodules

ldap3.extend.microsoft.addMembersToGroups module

ldap3.extend.microsoft.addMembersToGroups.ad_add_members_to_groups(connection, members_dn, groups_dn, fix=True, raise_error=False)[source]
Parameters:
  • connection – a bound Connection object
  • members_dn – the list of members to add to groups
  • groups_dn – the list of groups where members are to be added
  • fix – checks for group existence and already assigned members
  • raise_error – If the operation fails it raises an error instead of returning False
Returns:

a boolean where True means that the operation was successful and False means an error has happened

Establishes users-groups relations following the Active Directory rules: users are added to the member attribute of groups. Raises LDAPInvalidDnError if members or groups are not found in the DIT.

ldap3.extend.microsoft.dirSync module

class ldap3.extend.microsoft.dirSync.DirSync(connection, sync_base, sync_filter, attributes, cookie, object_security, ancestors_first, public_data_only, incremental_values, max_length, hex_guid)[source]

Bases: object

loop()[source]

ldap3.extend.microsoft.modifyPassword module

ldap3.extend.microsoft.modifyPassword.ad_modify_password(connection, user_dn, new_password, old_password, controls=None)[source]

ldap3.extend.microsoft.removeMembersFromGroups module

ldap3.extend.microsoft.removeMembersFromGroups.ad_remove_members_from_groups(connection, members_dn, groups_dn, fix, raise_error=False)[source]
Parameters:
  • connection – a bound Connection object
  • members_dn – the list of members to remove from groups
  • groups_dn – the list of groups where members are to be removed
  • fix – checks for group existence and existing members
  • raise_error – If the operation fails it raises an error instead of returning False
Returns:

a boolean where True means that the operation was successful and False means an error has happened

Removes users-groups relations following the Activwe Directory rules: users are removed from groups’ member attribute

ldap3.extend.microsoft.unlockAccount module

ldap3.extend.microsoft.unlockAccount.ad_unlock_account(connection, user_dn, controls=None)[source]

Module contents