security-import-account
Import a Sitecore user or role from a serialized .user/.role file, overwriting the account's current state. Export the account first if the file does not exist.
Instructions
Imports (deserializes) a Sitecore user or role from the CM's filesystem, overwriting the account's current state with the serialized one. The .user / .role file must exist — export it first with security-export-account. On SitecoreAI prefer Sitecore CLI serialization.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"accountType": "<accountType>",
"identity": "<identity>"
},
"name": "security-import-account"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Exact server-side .user / .role file to deserialize. Not with root. | |
| root | No | Server-side directory to deserialize from. Defaults to Sitecore's serialization folder. Not with path. | |
| identity | Yes | The account to import, e.g. 'sitecore\admin' or 'sitecore\Author'. | |
| accountType | Yes | Whether the identity names a user or a role. |