Skip to main content

AdminUser

Admin User resource for Zscaler Internet Access.

Resource operations

This resource supports the following standard methods: create(), load(), update(), delete(). 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 AdminUser
logging.getLogger('zssdk.zia').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 AdminUser
resource = session.zia.AdminUser(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

create()​

Creates a new AdminUser. Set properties on the resource instance, then call create() — this method takes no arguments.

Properties for creation:

NameTypeRequiredDescription
associate_with_existing_adminbooleanNo-
admin_scope_scope_entitiesEntityReferenceWrapperCollectionNo-
admin_scope_typestringNo-
admin_scopescope_group_member_entitiesEntityReferenceWrapperCollectionNo-
commentsstringNo-
disabledbooleanYes-
emailstringYes-
exec_mobile_app_enabledbooleanNo-
exec_mobile_app_tokensMobileAppTokenInfoWrapperCollectionNo-
is_auditorbooleanNo-
is_default_adminbooleanNo-
is_deprecated_default_adminbooleanNo-
is_exec_mobile_app_enabledbooleanNo-
is_password_expiredbooleanNo-
is_password_login_allowedbooleanNo-
is_product_update_comm_enabledbooleanNo-
is_security_report_comm_enabledbooleanNo-
is_service_update_comm_enabledbooleanNo-
login_namestringYes-
namestringNo-
new_location_create_allowedbooleanNo-
passwordstringNo-
pwd_last_modified_timelongNo-
roleEntityReferenceNo-
send_mobile_app_invitebooleanNo-
send_zdx_onboard_invitebooleanNo-
user_namestringYes-

Returns: AdminUser

Example:

resource = session.zia.AdminUser()
resource.disabled = True
resource.email = "user@example.com"
resource.login_name = "example-login-name"
resource.user_name = "example-user-name"
resource.create()
print(f"Created with ID: {resource.id}")

delete()​

Deletes a AdminUser by id. Only the id identifier is required; delete() takes no other arguments.

Example:

resource = session.zia.AdminUser(id="your-resource-id")
resource.delete()

get_current_user()​

Parameters:

NameTypeRequiredDescription
versionintegerNo-

Returns: AdminUser

Example:

resource = session.zia.AdminUser()
result = resource.get_current_user()
print(result)

load()​

Fetches an existing AdminUser by id. Only the id identifier is required; load() takes no other arguments.

Returns: AdminUser

Example:

resource = session.zia.AdminUser(id="your-resource-id")
resource.load()
print(resource.name)

update()​

Updates an existing AdminUser. Call load() first, modify properties, then call update() — this method takes no arguments.

Properties for update:

NameTypeRequiredDescription
admin_scope_scope_entitiesEntityReferenceWrapperCollectionNo-
admin_scope_typestringNo-
admin_scopescope_group_member_entitiesEntityReferenceWrapperCollectionNo-
commentsstringNo-
disabledbooleanYes-
emailstringYes-
exec_mobile_app_enabledbooleanNo-
exec_mobile_app_tokensMobileAppTokenInfoWrapperCollectionNo-
is_auditorbooleanNo-
is_default_adminbooleanNo-
is_deprecated_default_adminbooleanNo-
is_exec_mobile_app_enabledbooleanNo-
is_password_expiredbooleanNo-
is_password_login_allowedbooleanNo-
is_product_update_comm_enabledbooleanNo-
is_security_report_comm_enabledbooleanNo-
is_service_update_comm_enabledbooleanNo-
login_namestringYes-
namestringNo-
new_location_create_allowedbooleanNo-
passwordstringNo-
pwd_last_modified_timelongNo-
roleEntityReferenceNo-
send_mobile_app_invitebooleanNo-
send_zdx_onboard_invitebooleanNo-
user_namestringYes-

Returns: AdminUser

Example:

resource = session.zia.AdminUser(id="your-resource-id")
resource.load()
resource.name = "Updated value"
resource.update()

convert_admin_to_end_user()​

Parameters:

NameTypeRequiredDescription
admin_userbooleanNo-
commentsstringNo-
deletedbooleanNo-
departmentDepartmentNo-
disabledbooleanNo-
emailstringNo-
groupsGroupWrapperCollectionNo-
idintegerNo-
is_non_editablebooleanNo-
namestringNo-
passwordstringNo-
pilot_userbooleanNo-
pwd_last_modified_timeintegerNo-
system_defined_groupsGroupWrapperCollectionNo-
temp_auth_emailstringNo-
typestringNo-
user_risk_scoreUserRiskScoreNo-

Returns: User

Example:

resource = session.zia.AdminUser(id="your-resource-id")
result = resource.convert_admin_to_end_user()
print(result)

Attributes​

NameTypeRequiredDescription
admin_scope_scope_entitiesEntityReferenceWrapperCollectionNo-
admin_scope_typestringNo-
admin_scopescope_group_member_entitiesEntityReferenceWrapperCollectionNo-
commentsstringNo-
disabledbooleanYes-
emailstringYes-
exec_mobile_app_enabledbooleanNo-
exec_mobile_app_tokensMobileAppTokenInfoWrapperCollectionNo-
idintegerYes-
is_auditorbooleanNo-
is_default_adminbooleanNo-
is_deprecated_default_adminbooleanNo-
is_exec_mobile_app_enabledbooleanNo-
is_password_expiredbooleanNo-
is_password_login_allowedbooleanNo-
is_product_update_comm_enabledbooleanNo-
is_security_report_comm_enabledbooleanNo-
is_service_update_comm_enabledbooleanNo-
login_namestringYes-
namestringNo-
new_location_create_allowedbooleanNo-
passwordstringNo-
pwd_last_modified_timelongNo-
roleEntityReferenceNo-
send_mobile_app_invitebooleanNo-
send_zdx_onboard_invitebooleanNo-
user_namestringYes-
associate_with_existing_adminstringNo-