The active_directory Module

Note

While the module itself is fairly mature, these docs are definitely a work in progress. I’ll try to get more examples into the cookbook which should help people get started.

What is it?

The active_directory module is a light wrapper around the AD functionality. It allows easy searching of common objects (users, groups, ou) and browsing of their contents. AD objects are wrapped in Python objects which ease their use in Python code while allowing the underlying object to be accessed easily.

There’s also a cookbook of examples:

Where do I get it?

Prerequisites & Compatibility

The module has been tested on versions of Python from 2.4 to 2.7 plus Python 3.2 running on WinXP, Win7 & Win2k3. It may also work on older (or newer) versions. It’s tested with the most recent pywin32 extensions. While the adsi functionality it uses has been present in pywin32 for a long while, the early ports to Python 3.x did not include it; only release 217 and later do.