0
# Directory and User Management
1
2
Active Directory integration for user management, group operations, and organizational information access.
3
4
## Capabilities
5
6
### Directory Access
7
8
```python { .api }
9
def directory(self, resource: str = None) -> Directory:
10
"""Get a Directory instance for Active Directory operations."""
11
12
class Directory:
13
def get_users(self, limit: int = None, **filters) -> list[User]:
14
"""Get directory users."""
15
16
def get_user(self, user_id: str) -> User:
17
"""Get a specific user by ID."""
18
19
def search_users(self, search_text: str) -> list[User]:
20
"""Search for users."""
21
22
class User:
23
@property
24
def display_name(self) -> str:
25
"""User display name."""
26
27
@property
28
def email(self) -> str:
29
"""User email address."""
30
31
@property
32
def job_title(self) -> str:
33
"""User job title."""
34
35
@property
36
def department(self) -> str:
37
"""User department."""
38
39
def get_manager(self) -> 'User':
40
"""Get user's manager."""
41
42
def get_direct_reports(self) -> list['User']:
43
"""Get user's direct reports."""
44
```
45
46
## Usage Examples
47
48
```python
49
account = Account(credentials)
50
directory = account.directory()
51
52
# Get all users
53
users = directory.get_users(limit=100)
54
55
for user in users:
56
print(f"User: {user.display_name}")
57
print(f"Email: {user.email}")
58
print(f"Title: {user.job_title}")
59
print("---")
60
61
# Search for specific users
62
managers = directory.search_users("manager")
63
```