update_database_user
Update permissions, schema access, audit policies, and retention periods for existing database users in SAP Datasphere.
Instructions
Update permissions and configuration for an existing database user.
IMPORTANT: This is a HIGH-RISK tool that requires user consent before execution.
Use this tool when:
User requests "Grant schema access to JEFF in SALES"
Modifying user permissions or access levels
Enabling/disabling audit policies
Changing retention periods
Updating user privileges
What you can update:
Consumption permissions (read access, grants)
Schema access (space, local, HDI)
Script server access
Audit policies and retention periods
Password policies
Required parameters:
space_id: The space containing the database user
database_user_id: The user to update
updated_definition: JSON with new configuration (full definition required)
Update examples:
Grant schema access:
{
"consumption": {
"spaceSchemaAccess": true,
"consumptionWithGrant": false,
...
},
"ingestion": {...}
}Enable audit logging:
{
"consumption": {...},
"ingestion": {
"auditing": {
"dppRead": {
"isAuditPolicyActive": true,
"retentionPeriod": 90
}
}
}
}Important notes:
Must provide complete user definition (not partial updates)
Changes take effect immediately
Active sessions may need reconnection
All changes are logged for audit
Example queries:
"Grant space schema access to JEFF"
"Enable audit logging for ANALYST with 90 day retention"
"Update REPORTING_USER to have consumption with grant"
Note: Corresponds to CLI: datasphere dbusers update --space --databaseuser --file-path <def.json>
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | Yes | The space ID containing the database user (e.g., 'SALES', 'FINANCE'). Must be uppercase. | |
| output_file | No | Optional: Path to save updated configuration JSON (e.g., 'jeff_updated.json'). | |
| database_user_id | Yes | Database user name suffix to update (e.g., 'JEFF', 'ANALYST'). | |
| updated_definition | Yes | Complete JSON object with updated permissions. Must include all settings (consumption, ingestion). |