UiPath Documentation
uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

UIP 或用户

“uip 或用户”的语法和选项,用于管理 Orchestrator 租户用户及其文件夹和角色分配。

uip or users manages Orchestrator users at the tenant level. Orchestrator users are backed by Identity Service (IS) — this tool does not create standalone users from scratch. Instead, users import references an existing IS directory principal (a user, group, robot account, or external application) and provisions it into the tenant; users update then edits the tenant-side properties (license, session permissions, unattended credentials) that live on the Orchestrator side. There is no users delete — user removal is managed through Identity Service or the Orchestrator portal, not this CLI. For folder-level role management, see uip or roles.

大纲

uip or users list [options]
uip or users list-in-folder [--folder-path <path> | --folder-key <key>] [options]
uip or users list-available [--folder-path <path> | --folder-key <key>] [options]
uip or users get <user-key>
uip or users import (--username <name> | --directory-id <id>) --type <type> [--folder-path <path> | --folder-key <key>] [--role-keys <keys>]
uip or users assign --user-key <key> [--folder-path <path> | --folder-key <key>] [--role-keys <keys>]
uip or users unassign --user-key <key> [--folder-path <path> | --folder-key <key>]
uip or users update <user-key> [options]
uip or users current
uip or users assign-roles <user-key> --role-keys <keys>
uip or users list [options]
uip or users list-in-folder [--folder-path <path> | --folder-key <key>] [options]
uip or users list-available [--folder-path <path> | --folder-key <key>] [options]
uip or users get <user-key>
uip or users import (--username <name> | --directory-id <id>) --type <type> [--folder-path <path> | --folder-key <key>] [--role-keys <keys>]
uip or users assign --user-key <key> [--folder-path <path> | --folder-key <key>] [--role-keys <keys>]
uip or users unassign --user-key <key> [--folder-path <path> | --folder-key <key>]
uip or users update <user-key> [options]
uip or users current
uip or users assign-roles <user-key> --role-keys <keys>

动词

动词用途
list带有可选筛选器的租户用户列表。
list-in-folder列出分配到文件夹的用户及其文件夹级别角色。
list-available列出仍可分配至文件夹(尚未分配)的用户。
get通过密钥获取一个用户。
importImport an existing Identity Service directory principal into the tenant.
assign将用户分配到文件夹,并可以选择使用文件夹级别角色。
unassign从文件夹中删除用户。
update (alias edit)Update a user's tenant-side properties (PATCH semantics).
current返回当前经过身份验证的用户的详细信息。
assign-roles替换用户的租户级别角色分配。

uip 或用户列表

列出租户中的用户。返回用户密钥 (GUID)、用户名、全名、电子邮件、类型和活动状态。

选项

默认描述
--keyGUID按用户密钥筛选(精确匹配)。
--usernametext按用户名筛选(包含匹配项)。
--emailtext按电子邮件地址筛选(包含匹配项)。
-l--limit数字50页面大小。
--offset数字0跳过计数。
--sort-by字段OData 排序(例如, UserName asc )。
--all-fields标记关闭返回完整的 API 有效负载,而不是策划摘要。

示例

uip or users list --limit 10
uip or users list --username admin
uip or users list --output-filter 'Data[].{key:Key, name:UserName}'
uip or users list --limit 10
uip or users list --username admin
uip or users list --output-filter 'Data[].{key:Key, name:UserName}'

数据形状(--输出 json)

{
  "Code": "UserList",
  "Data": [
    {
      "Key": "d4e5f6a7-0000-0000-0000-000000000001",
      "UserName": "admin@example.com",
      "FullName": "Admin User",
      "Email": "admin@example.com",
      "Type": "User",
      "IsActive": true
    }
  ],
  "Pagination": { "Returned": 1, "Limit": 50, "Offset": 0 }
}
{
  "Code": "UserList",
  "Data": [
    {
      "Key": "d4e5f6a7-0000-0000-0000-000000000001",
      "UserName": "admin@example.com",
      "FullName": "Admin User",
      "Email": "admin@example.com",
      "Type": "User",
      "IsActive": true
    }
  ],
  "Pagination": { "Returned": 1, "Limit": 50, "Offset": 0 }
}

uip 或文件夹中的用户列表

列出分配到文件夹的用户及其文件夹级别角色。需要--folder-path--folder-key

选项

默认描述
--folder-path路径目标文件夹。提供此项或--folder-key
--folder-keyGUID目标文件夹。提供此项或--folder-path
--include-inherited标记关闭同时显示从父文件夹继承的用户。
-l--limit数字50页面大小。
--offset数字0跳过计数。
--sort-by字段Id descOData 排序。
--all-fields标记关闭返回完整的 API 有效负载,而不是策划摘要。

示例

uip or users list-in-folder --folder-path "Shared"
uip or users list-in-folder --folder-path "Shared" --include-inherited
uip or users list-in-folder --folder-path "Shared" \
    --output-filter 'Data[].{name:UserName, roles:Roles}'
uip or users list-in-folder --folder-path "Shared"
uip or users list-in-folder --folder-path "Shared" --include-inherited
uip or users list-in-folder --folder-path "Shared" \
    --output-filter 'Data[].{name:UserName, roles:Roles}'

数据形状(--输出 json)

{
  "Code": "UserList",
  "Data": [
    {
      "Key": "d4e5f6a7-0000-0000-0000-000000000001",
      "UserName": "admin@example.com",
      "FullName": "Admin User",
      "Type": "User",
      "IsInherited": false,
      "Roles": "Folder Administrator"
    }
  ]
}
{
  "Code": "UserList",
  "Data": [
    {
      "Key": "d4e5f6a7-0000-0000-0000-000000000001",
      "UserName": "admin@example.com",
      "FullName": "Admin User",
      "Type": "User",
      "IsInherited": false,
      "Roles": "Folder Administrator"
    }
  ]
}

uip 或用户列表-可用

列出仍可分配给文件夹的租户用户。将返回的键与users assignroles assign一起使用。

选项

默认描述
--folder-path路径目标文件夹。提供此项或--folder-key
--folder-keyGUID目标文件夹。提供此项或--folder-path
-s--searchtext按用户名筛选(包含匹配项)。
-l--limit数字50页面大小。
--offset数字0跳过计数。

示例

uip or users list-available --folder-path "Shared"
uip or users list-available --folder-path "Shared" --search admin
uip or users list-available --folder-path "Shared" \
    --output-filter 'Data[].Key'
uip or users list-available --folder-path "Shared"
uip or users list-available --folder-path "Shared" --search admin
uip or users list-available --folder-path "Shared" \
    --output-filter 'Data[].Key'

数据形状(--输出 json)

{
  "Code": "UserAvailableList",
  "Data": [
    {
      "Key": "d4e5f6a7-0000-0000-0000-000000000003",
      "UserName": "newuser@example.com",
      "Roles": ""
    }
  ]
}
{
  "Code": "UserAvailableList",
  "Data": [
    {
      "Key": "d4e5f6a7-0000-0000-0000-000000000003",
      "UserName": "newuser@example.com",
      "Roles": ""
    }
  ]
}

uip 或用户获取

按 GUID 密钥获取用户。

参数

名称必填用途
<user-key>用户密钥 (GUID)。

选项

默认描述
--all-fields标记关闭返回完整的 API 有效负载,而不是策划摘要。

示例

uip or users get d4e5f6a7-0000-0000-0000-000000000001
uip or users get d4e5f6a7-0000-0000-0000-000000000001 --all-fields
uip or users get d4e5f6a7-0000-0000-0000-000000000001 --output-filter 'Data.Email'
uip or users get d4e5f6a7-0000-0000-0000-000000000001
uip or users get d4e5f6a7-0000-0000-0000-000000000001 --all-fields
uip or users get d4e5f6a7-0000-0000-0000-000000000001 --output-filter 'Data.Email'

数据形状(--输出 json)

{
  "Code": "User",
  "Data": {
    "Key": "d4e5f6a7-0000-0000-0000-000000000001",
    "UserName": "admin@example.com",
    "FullName": "Admin User",
    "Email": "admin@example.com",
    "Type": "User",
    "IsActive": true
  }
}
{
  "Code": "User",
  "Data": {
    "Key": "d4e5f6a7-0000-0000-0000-000000000001",
    "UserName": "admin@example.com",
    "FullName": "Admin User",
    "Email": "admin@example.com",
    "Type": "User",
    "IsActive": true
  }
}

uip or users import

Import a directory principal — an Identity Service user, group, robot account, or external application — into this tenant. This is the only way this CLI provisions a new tenant user; there is no standalone "create a user" verb, because Orchestrator users are always backed by an IS principal.

References an existing IS principal by --username or --directory-id, plus --type to declare which kind of principal it is (the CLI does not guess). Optionally assigns folder roles in the same call with --folder-path/--folder-key and --role-keys — both a folder and roles must be provided together, or neither. --directory-id imports are idempotent: importing an already-imported principal by directory ID returns the existing tenant record instead of failing.

Robot accounts and external applications must be imported with --directory-id (the IS UUID) — Orchestrator can't resolve them by <domain>\<name> the way it resolves a directory user. Find the ID with uip admin robot-accounts list --search <name> or uip admin external-apps list.

Arguments and required identifiers

名称必填用途
--usernameone of --username/--directory-idIdentity Service username (typically an email).
--directory-idone of --username/--directory-idIdentity Service directory identifier (OIDC subject / IS UUID). Required for DirectoryRobot and DirectoryExternalApplication types.

选项

默认描述
--typeDirectoryUser | DirectoryGroup | DirectoryRobot | DirectoryExternalApplication必填Directory principal type.
--domaintextDirectory domain name as configured in Identity Service. Only needed for on-premises environments with configured AD domains.
--folder-path路径Folder to assign the imported principal to. Use with --role-keys.
--folder-keyGUIDFolder alternative to --folder-path. Use with --role-keys.
--role-keysCSV 格式的 GUIDFolder role GUIDs to grant. Requires a folder option; a folder option without --role-keys is also rejected.

示例

uip or users import --username alice@example.com

uip or users import --username alice@example.com \
    --folder-path Shared --role-keys a1b2c3d4-0000-0000-0000-000000000001

# Robot account — directory ID required
uip or users import --directory-id 11111111-2222-3333-4444-555555555555 \
    --type DirectoryRobot
uip or users import --username alice@example.com

uip or users import --username alice@example.com \
    --folder-path Shared --role-keys a1b2c3d4-0000-0000-0000-000000000001

# Robot account — directory ID required
uip or users import --directory-id 11111111-2222-3333-4444-555555555555 \
    --type DirectoryRobot

数据形状(--输出 json)

{
  "Code": "UserImported",
  "Data": {
    "UserName": "alice@example.com",
    "Type": "DirectoryUser",
    "AssignedFolderPath": "Shared",
    "AssignedRoleKeys": ["a1b2c3d4-0000-0000-0000-000000000001"]
  }
}
{
  "Code": "UserImported",
  "Data": {
    "UserName": "alice@example.com",
    "Type": "DirectoryUser",
    "AssignedFolderPath": "Shared",
    "AssignedRoleKeys": ["a1b2c3d4-0000-0000-0000-000000000001"]
  }
}

AlreadyImported: true is added when --directory-id matched a principal already present in the tenant.

UIP 或用户分配

将用户分配到文件夹,并可以选择使用文件夹级别角色。

备注:

CAUTION — destructive on roles. If --role-keys is passed, the server replaces all of the user's existing roles in the target folder with the ones supplied — roles not in the payload are removed silently. To preserve existing roles, read them first with roles user-roles list <principal-name> --type <type> and pass the full desired union to --role-keys. For additive tenant-level role membership on a role, use roles users set instead.

选项

默认描述
--user-keyGUID必填用户密钥。
--role-keysCSV 格式的 GUID文件夹范围角色 GUID。
--folder-path路径目标文件夹。提供此项或--folder-key
--folder-keyGUID目标文件夹。

示例

uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-path "Shared"

uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-path "Shared" \
    --role-keys a1b2c3d4-0000-0000-0000-000000000002

uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-path "Shared" --output-filter 'Data.Status'
uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-path "Shared"

uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-path "Shared" \
    --role-keys a1b2c3d4-0000-0000-0000-000000000002

uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-path "Shared" --output-filter 'Data.Status'

数据形状(--输出 json)

{
  "Code": "UserAssigned",
  "Data": {
    "UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
    "FolderPath": "Shared",
    "Status": "Assigned successfully"
  }
}
{
  "Code": "UserAssigned",
  "Data": {
    "UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
    "FolderPath": "Shared",
    "Status": "Assigned successfully"
  }
}

uip 或用户取消分配

Remove a user from a folder. The user is not deleted — only their folder assignment is removed.

选项

默认描述
--user-keyGUID必填用户密钥。
--folder-path路径要从中删除的文件夹。提供此项或--folder-key
--folder-keyGUID要从中删除的文件夹。

示例

uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-path "Shared"

uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-key b1c2d3e4-0000-0000-0000-000000000001

uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-path "Shared" --output-filter 'Data.Status'
uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-path "Shared"

uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-key b1c2d3e4-0000-0000-0000-000000000001

uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
    --folder-path "Shared" --output-filter 'Data.Status'

数据形状(--输出 json)

{
  "Code": "UserUnassigned",
  "Data": {
    "UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
    "FolderPath": "Shared",
    "Status": "Unassigned successfully"
  }
}
{
  "Code": "UserUnassigned",
  "Data": {
    "UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
    "FolderPath": "Shared",
    "Status": "Unassigned successfully"
  }
}

uip or users update

Update a user's tenant-side properties by key (GUID). Reads current values, merges the supplied fields, and saves. Provide at least one option.

edit is a registered alias for this verb — uip or users edit works identically to uip or users update.

Reliably editable: license profile, session flags, and unattended robot credentials. Identity attributes (--name, --surname, --email, --type) are accepted by the API, but for directory principals (DirectoryUser/Group/Robot/ExternalApplication) those fields are normally synced from Identity Service — changing them here only edits the Orchestrator-side cached copy and may be overwritten on the next IS sync. For a durable identity change, edit the IS principal directly.

This command does not expose role assignments — use users assign (folder roles) or users assign-roles (tenant roles) for that; the current tenant role list is always re-sent unchanged so an update never touches it.

参数

名称必填用途
<user-key>用户密钥 (GUID)。

选项

Identity (Orchestrator-side cache only for directory principals)
描述
--nametextNew first name.
--surnametextNew last name.
--emailtextNew email address.
--typetextNew user type (for example User, DirectoryUser).
License and session permissions
描述
--license-typetextFor example Attended, Unattended, StudioPro.
--allow-unattended / --deny-unattended标记允许或拒绝执行 Unattended 作业。
--allow-attended / --deny-attended标记允许或拒绝 Attended 会话。
--allow-login / --deny-login标记允许或拒绝 Orchestrator 登录。
--allow-personal-workspace / --deny-personal-workspace标记允许或拒绝个人工作区。
--active / --inactive标记激活或停用用户。
Unattended 执行凭据
描述
--unattended-usernametextWindows account for unattended execution (for example DOMAIN\user).
--unattended-passwordtextPassword, or — for a read-only credential store — the external secret reference name.
--credential-store-keyGUIDCredential store for unattended execution credentials. Use credential-stores list to find it.
--credential-typeDefault | SmartCardCredential type.
--limit-concurrent / --no-limit-concurrent标记允许或禁止在多台计算机上并发执行。

If you set any unattended-credential flag on a user with no existing UnattendedRobot record, both --unattended-username and --unattended-password are required together — Orchestrator silently discards an incomplete record, so the CLI refuses to submit one rather than report a false success. Editing an existing record accepts any subset of these flags.

示例

uip or users update d4e5f6a7-0000-0000-0000-000000000001 --email newmail@example.com

uip or users update d4e5f6a7-0000-0000-0000-000000000001 \
    --allow-unattended --license-type Unattended \
    --unattended-username DOMAIN\\bot --unattended-password s3cret

uip or users update d4e5f6a7-0000-0000-0000-000000000001 --inactive \
    --output-filter 'Data.Status'
uip or users update d4e5f6a7-0000-0000-0000-000000000001 --email newmail@example.com

uip or users update d4e5f6a7-0000-0000-0000-000000000001 \
    --allow-unattended --license-type Unattended \
    --unattended-username DOMAIN\\bot --unattended-password s3cret

uip or users update d4e5f6a7-0000-0000-0000-000000000001 --inactive \
    --output-filter 'Data.Status'

数据形状(--输出 json)

{
  "Code": "UserUpdated",
  "Data": { "Key": "d4e5f6a7-0000-0000-0000-000000000001", "Status": "Updated successfully" }
}
{
  "Code": "UserUpdated",
  "Data": { "Key": "d4e5f6a7-0000-0000-0000-000000000001", "Status": "Updated successfully" }
}

uip 或用户当前值

返回当前经过身份验证的用户。用于验证会话和发现自己的用户密钥。

选项

默认描述

示例

uip or users current
uip or users current --output-filter 'Data.Key'
uip or users current --output table
uip or users current
uip or users current --output-filter 'Data.Key'
uip or users current --output table

数据形状(--输出 json)

User形状相同的users get

uip 或用户分配角色

Assign tenant-level roles to a user.

备注:

CAUTION — destructive. The server replaces the user's entire tenant-level role list with the keys passed via --role-keys — roles not in the payload are removed silently. To preserve existing tenant roles, read them first with roles user-roles list <principal-name> --type <type> and pass the full desired union to --role-keys. Unlike users assign (folder-level roles), this sets roles that apply across the entire tenant.

参数

名称必填用途
<user-key>用户密钥 (GUID)。

选项

默认描述
--role-keysCSV 格式的 GUID必填要在租户作用域内分配的角色 GUID。

示例

uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
    --role-keys a1b2c3d4-0000-0000-0000-000000000001

uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
    --role-keys a1b2c3d4-0000-0000-0000-000000000001,a1b2c3d4-0000-0000-0000-000000000002

uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
    --role-keys a1b2c3d4-0000-0000-0000-000000000001 \
    --output-filter 'Data.RolesAssigned'
uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
    --role-keys a1b2c3d4-0000-0000-0000-000000000001

uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
    --role-keys a1b2c3d4-0000-0000-0000-000000000001,a1b2c3d4-0000-0000-0000-000000000002

uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
    --role-keys a1b2c3d4-0000-0000-0000-000000000001 \
    --output-filter 'Data.RolesAssigned'

数据形状(--输出 json)

{
  "Code": "UserRolesAssigned",
  "Data": {
    "UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
    "RolesAssigned": 1,
    "Status": "Assigned successfully"
  }
}
{
  "Code": "UserRolesAssigned",
  "Data": {
    "UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
    "RolesAssigned": 1,
    "Status": "Assigned successfully"
  }
}

退出代码

请参阅退出代码。没有动词特定的覆盖。

  • uip or roles — manage roles, role-user membership, and principal permission inspection (roles user-roles list, roles user-permissions list).
  • uip or folders — 在unassign users assign文件夹密钥。
  • uip or jobs — 尤其是jobs start --user-keys

另请参阅

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新