AdminUser
Admin User resource for Zscaler Internet Access.
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
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier |
Actions
create()
Creates a new AdminUser. Set properties on the resource instance, then call create() — this method takes no arguments.
Properties for creation:
| Name | Type | Required | Description |
|---|---|---|---|
associate_with_existing_admin | boolean | No | - |
admin_scope_scope_entities | EntityReferenceWrapperCollection | No | - |
admin_scope_type | string | No | - |
admin_scopescope_group_member_entities | EntityReferenceWrapperCollection | No | - |
comments | string | No | - |
disabled | boolean | Yes | - |
email | string | Yes | - |
exec_mobile_app_enabled | boolean | No | - |
exec_mobile_app_tokens | MobileAppTokenInfoWrapperCollection | No | - |
is_auditor | boolean | No | - |
is_default_admin | boolean | No | - |
is_deprecated_default_admin | boolean | No | - |
is_exec_mobile_app_enabled | boolean | No | - |
is_password_expired | boolean | No | - |
is_password_login_allowed | boolean | No | - |
is_product_update_comm_enabled | boolean | No | - |
is_security_report_comm_enabled | boolean | No | - |
is_service_update_comm_enabled | boolean | No | - |
login_name | string | Yes | - |
name | string | No | - |
new_location_create_allowed | boolean | No | - |
password | string | No | - |
pwd_last_modified_time | long | No | - |
role | EntityReference | No | - |
send_mobile_app_invite | boolean | No | - |
send_zdx_onboard_invite | boolean | No | - |
user_name | string | Yes | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
version | integer | No | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
admin_scope_scope_entities | EntityReferenceWrapperCollection | No | - |
admin_scope_type | string | No | - |
admin_scopescope_group_member_entities | EntityReferenceWrapperCollection | No | - |
comments | string | No | - |
disabled | boolean | Yes | - |
email | string | Yes | - |
exec_mobile_app_enabled | boolean | No | - |
exec_mobile_app_tokens | MobileAppTokenInfoWrapperCollection | No | - |
is_auditor | boolean | No | - |
is_default_admin | boolean | No | - |
is_deprecated_default_admin | boolean | No | - |
is_exec_mobile_app_enabled | boolean | No | - |
is_password_expired | boolean | No | - |
is_password_login_allowed | boolean | No | - |
is_product_update_comm_enabled | boolean | No | - |
is_security_report_comm_enabled | boolean | No | - |
is_service_update_comm_enabled | boolean | No | - |
login_name | string | Yes | - |
name | string | No | - |
new_location_create_allowed | boolean | No | - |
password | string | No | - |
pwd_last_modified_time | long | No | - |
role | EntityReference | No | - |
send_mobile_app_invite | boolean | No | - |
send_zdx_onboard_invite | boolean | No | - |
user_name | string | Yes | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
admin_user | boolean | No | - |
comments | string | No | - |
deleted | boolean | No | - |
department | Department | No | - |
disabled | boolean | No | - |
email | string | No | - |
groups | GroupWrapperCollection | No | - |
id | integer | No | - |
is_non_editable | boolean | No | - |
name | string | No | - |
password | string | No | - |
pilot_user | boolean | No | - |
pwd_last_modified_time | integer | No | - |
system_defined_groups | GroupWrapperCollection | No | - |
temp_auth_email | string | No | - |
type | string | No | - |
user_risk_score | UserRiskScore | No | - |
Returns: User
Example:
resource = session.zia.AdminUser(id="your-resource-id")
result = resource.convert_admin_to_end_user()
print(result)
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
admin_scope_scope_entities | EntityReferenceWrapperCollection | No | - |
admin_scope_type | string | No | - |
admin_scopescope_group_member_entities | EntityReferenceWrapperCollection | No | - |
comments | string | No | - |
disabled | boolean | Yes | - |
email | string | Yes | - |
exec_mobile_app_enabled | boolean | No | - |
exec_mobile_app_tokens | MobileAppTokenInfoWrapperCollection | No | - |
id | integer | Yes | - |
is_auditor | boolean | No | - |
is_default_admin | boolean | No | - |
is_deprecated_default_admin | boolean | No | - |
is_exec_mobile_app_enabled | boolean | No | - |
is_password_expired | boolean | No | - |
is_password_login_allowed | boolean | No | - |
is_product_update_comm_enabled | boolean | No | - |
is_security_report_comm_enabled | boolean | No | - |
is_service_update_comm_enabled | boolean | No | - |
login_name | string | Yes | - |
name | string | No | - |
new_location_create_allowed | boolean | No | - |
password | string | No | - |
pwd_last_modified_time | long | No | - |
role | EntityReference | No | - |
send_mobile_app_invite | boolean | No | - |
send_zdx_onboard_invite | boolean | No | - |
user_name | string | Yes | - |
associate_with_existing_admin | string | No | - |
Related
- AdminUser - Data structure definition
- Logging guide - enable verbose logs while debugging this resource