Skip to main content
Skip table of contents

Update User

This command is a crucial feature that allows administrators to modify user account details within the system. This command ensures that user information remains current and reflects any changes in roles, permissions, or other relevant attributes.

Reader Note

Please note that this command is not publicly available. To request access, please contact D3 support.

Implementation

System

Command Category

System Utility

Tags

USER

Inputs

Parameter Name

Required/Optional

Description

Sample Data

User ID

Required

The unique identifier of the user is a mandatory parameter to locate the user to be updated.

12

User Information

Optional

The comprehensive set of user information required to update a user profile encompasses personal details, security settings, and role-specific attributes. Users should consult the sample data to compile their own user information; note that all attributes are optional. For the mapping relationship between TimezoneID and timezone Name, please refer to the command documentation.

CODE
{

    "username": "test0303",

    "emailAddress": "jackie@d3security.com",

    "firstName": "Jackie",

    "lastName": "Smith",

    "phoneNumber": "17778990",

    "roleId": 3,

    "isActive": 1,

    "groupIds": [

        100014,

        100015,

        100011

    ],

    "siteIds": [

        100028,

        100012

    ],

    "timezoneId": 5,

    "securityLevel": 1

}

Output

Return Data

The returned result of this command. If some required parameters are not defined, this returned data could be empty. The returned result can be passed down directly to a subsequent command in playbooks.

SAMPLE DATA

CODE
{

    "Status": "Successful",

    "Data": [

        {

            "FieldName": "Email",

            "UpdateValue": "jackie@d3security.com"

        },

        {

            "FieldName": "UserName",

            "UpdateValue": "test0303"

        },

        {

            "FieldName": "FirstName",

            "UpdateValue": "Jackie"

        },

        {

            "FieldName": "LastName",

            "UpdateValue": "Smith"

        },

        {

            "FieldName": "PhoneNumber",

            "UpdateValue": "17778990"

        },

        {

            "FieldName": "IsActive",

            "UpdateValue": "1"

        },

        {

            "FieldName": "TimeZoneId",

            "UpdateValue": "5"

        },

        {

            "FieldName": "SecurityLevel",

            "UpdateValue": "1"

        },

        {

            "FieldName": "RoleId",

            "UpdateValue": "3"

        },

        {

            "FieldName": "SiteIds",

            "UpdateValue": "100028,100012"

        }

    ],

    "ErrorData": [

        {

            "FieldName": "GroupIds",

            "UpdateValue": "Invalid Group ID found in input: 100014,100015,100011"

        }

    ]

}

Remote Command API

The D3 command API allows you to send requests to D3 SOAR to execute this utility command via REST API.

Request

POST

CODE
https:/{base_url}/{api_namespace}/api/Command/UpdateUser

Headers

Please refer to the page Webhook Configuration Guide - Authentication Method: API Keys for more details.

Request Body

CODE
{

  "Username": <Username here>,

  "Site": <Site here>,

  "CommandParams": {

	"User ID": <User ID here>,

	"User Information": <User Information here>

  }

}

Body Parameters

Parameter Name

Type

Required/Optional

Description

Username

String

Required

The username of your D3 SOAR account.

Site

String

Required

The D3 SOAR site to run the remote command.

User ID

String

Required

The unique identifier of the user is a mandatory parameter to locate the user to be updated.

User Information

JSON Object

Required

The comprehensive set of user information required to update a user profile encompasses personal details, security settings, and role-specific attributes. Users should consult the sample data to compile their own user information; note that all attributes are optional. For the mapping relationship between TimezoneID and timezone Name, please refer to the command documentation.

Sample Request

SAMPLE DATA

CODE
{

  "Username": "Admin",

  "Site": "Security Operations",

  "CommandParams": {

    "User ID": 12,

    "User Information": {

      "username": "test0303",

      "emailAddress": "jackie@d3security.com",

      "firstName": "Jackie",

      "lastName": "Smith",

      "phoneNumber": "17778990",

      "roleId": 3,

      "isActive": 1,

      "groupIds": [

        100014,

        100015,

        100011

      ],

      "siteIds": [

        100028,

        100012

      ],

      "timezoneId": 5,

      "securityLevel": 1

    }

  }

}

Response

Response Fields

Field Name

Type

Description

error

String

The error message if the API request has failed.

returnData

String

The return data from the API request.

Sample Response

CODE
{

    "error": "",

    "returnData": {

        "Status": "Successful",

        "Data": [

            {

                "FieldName": "Email",

                "UpdateValue": "jackie@d3security.com"

            },

            {

                "FieldName": "UserName",

                "UpdateValue": "test0303"

            },

            {

                "FieldName": "FirstName",

                "UpdateValue": "Jackie"

            },

            {

                "FieldName": "LastName",

                "UpdateValue": "Smith"

            },

            {

                "FieldName": "PhoneNumber",

                "UpdateValue": "17778990"

            },

            {

                "FieldName": "IsActive",

                "UpdateValue": "1"

            },

            {

                "FieldName": "TimeZoneId",

                "UpdateValue": "5"

            },

            {

                "FieldName": "SecurityLevel",

                "UpdateValue": "1"

            }

        ],

        "ErrorData": [

            {

                "FieldName": "RoleId",

                "UpdateValue": "Invalid ROLE_ID not found: 3"

            },

            {

                "FieldName": "GroupIds",

                "UpdateValue": "Invalid Group ID found in input: 100014,100015,100011"

            },

            {

                "FieldName": "SiteIds",

                "UpdateValue": "Invalid Site ID found in input: 100028,100012"

            }

        ]
    }
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.