Skip to main content

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​

NameTypeDescription
idstringUnique 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:

NameTypeRequiredDescription
didlongYes-

Returns: ConfigDevice

Example:

resource = session.zdx.UserInfo(id="your-resource-id")
result = resource.get_user_device(did=3600)
print(result)

Attributes​

NameTypeRequiredDescription
deletedbooleanNo-
disabledbooleanNo-
emailstringNo-
idlongYes-
namestringNo-
name_with_emailstringNo-
admin_userbooleanNo-
commentsstringNo-
departmentDepartmentResponseNo-
groupsEntityResponseCollectionNo-
passwordstringNo-