UserInfo
User Info resource for Zscaler Digital Experience.
Resource operations
This resource supports the following standard methods: load(). They operate on the instance state — set properties with dot notation, then call the method with no arguments. Any other action listed below is a custom action that takes explicit keyword arguments and returns a value.
Quick Start
import zssdk
import logging
# Enable debug logging for UserInfo
logging.getLogger('zssdk.zdx').setLevel(logging.DEBUG)
logging.basicConfig(level=logging.DEBUG)
session = zssdk.Session(
vanity_domain="your-vanity-domain",
client_id="your-client-id",
client_secret="your-client-secret",
)
# Get a specific UserInfo
resource = session.zdx.UserInfo(id="your-resource-id")
resource.load()
print(resource)
# Debug output shows HTTP request/response details
Identifiers
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier |
Actions
get_user_department()
Gets the department a specific user belongs to.
Returns: DepartmentResponse
Example:
resource = session.zdx.UserInfo(id="your-resource-id")
result = resource.get_user_department()
print(result)
load()
Gets detailed information for a specific user, including their department and group associations.
Fetches an existing UserInfo by id. Only the id identifier is required; load() takes no other arguments.
Returns: UserInfo
Example:
resource = session.zdx.UserInfo(id="your-resource-id")
resource.load()
print(resource.name)
get_user_device()
Gets information for a specific device belonging to a specific user.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
did | long | Yes | - |
Returns: ConfigDevice
Example:
resource = session.zdx.UserInfo(id="your-resource-id")
result = resource.get_user_device(did=3600)
print(result)
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
deleted | boolean | No | - |
disabled | boolean | No | - |
email | string | No | - |
id | long | Yes | - |
name | string | No | - |
name_with_email | string | No | - |
admin_user | boolean | No | - |
comments | string | No | - |
department | DepartmentResponse | No | - |
groups | EntityResponseCollection | No | - |
password | string | No | - |
Related
- UserInfo - Data structure definition
- Logging guide - enable verbose logs while debugging this resource