uipath-admin
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUiPath Admin
UiPath Admin
Administrative operations on UiPath via — Identity Server, Authorization, OMS, IP Restriction, Audit. Per-area workflows, command references, and procedures are in the linked files below — this file is the entry contract.
uip admin通过对UiPath执行管理操作 —— 涵盖Identity Server、授权管理、OMS、IP限制、审计功能。各领域的工作流、命令参考和操作流程见下方链接文件,本文档为入口约定。
uip adminWhen to Use This Skill
何时使用本技能
Identity
身份管理
- Manage identity users — list, create, invite, update, delete
- Manage groups — CRUD + add/remove members
- Manage robot accounts — create, update, delete unattended robot identities
- Manage external apps — OAuth2 clients, secrets, federated credentials
- Manage personal access tokens (PATs) — create, list, revoke, regenerate
- Configure SMTP — get, update, test, delete email settings
- Browse OAuth2 scopes — list available scopes for external apps and PATs
- Onboard human user — invite, assign to groups
- Onboard robot account — create account, assign to groups
- 管理身份用户 —— 列出、创建、邀请、更新、删除用户
- 管理群组 —— 增删改查(CRUD)以及添加/移除成员
- 管理机器人账号 —— 创建、更新、删除无人值守机器人身份
- 管理外部应用 —— OAuth2客户端、密钥、联合凭证
- 管理个人访问令牌(PAT) —— 创建、列出、撤销、重新生成
- 配置SMTP —— 获取、更新、测试、删除邮件设置
- 浏览OAuth2权限范围 —— 列出外部应用和PAT可用的权限范围
- 导入人工用户 —— 邀请用户并分配至群组
- 导入机器人账号 —— 创建账号并分配至群组
Authz
授权管理
- Manage custom roles — CRUD on Authorization service role definitions (scope shapes: ,
Organization,TenantGlobal,Tenant)Project - Manage role assignments — assign roles to users/groups/robot accounts at ,
Organization,Tenant,TenantGlobal,Project, orFolderscopeApp - List permission definitions — read-only catalog of permissions across services
- Check effective access — compute what a principal can actually do at a given scope (Policy Decision Point)
- Grant permission(s) to a principal — ad-hoc "grant me X" / "give <user> Y, Z" requests resolved via the scope/service intersection flow
- 管理自定义角色 —— 对授权服务角色定义执行增删改查(范围类型:、
Organization、TenantGlobal、Tenant)Project - 管理角色分配 —— 在、
Organization、Tenant、TenantGlobal、Project或Folder层级,为用户/群组/机器人账号分配角色App - 列出权限定义 —— 跨服务的只读权限目录
- 查询有效权限 —— 计算主体在指定层级实际可执行的操作(策略决策点PDP)
- 为主体授予权限 —— 通过范围/服务交叉流程,处理临时的“授予我权限X”或“为<用户>分配权限Y、Z”请求
OMS
OMS管理
- Inspect / update the current organization — (read + update only; no CLI create/delete)
uip admin organizations - Manage tenant lifecycle — create, enable, disable, delete tenants in the caller's org
- Provision org-level or tenant-level services — ,
services list,list-available,add,enable,disableremove - Poll async OMS operations — mutations return
tenants; poll viaoperationId(the canonical poll endpoint)organizations operation get <id> - List available regions — discover provisioning regions before
tenants create
- 查看/更新当前组织 —— 使用(仅支持读取和更新;CLI不支持创建/删除)
uip admin organizations - 管理租户生命周期 —— 在调用者所属组织中创建、启用、禁用、删除租户
- 配置组织级或租户级服务 —— 使用、
services list、list-available、add、enable、disable命令remove - 轮询异步OMS操作 —— 变更操作返回
tenants;通过operationId进行轮询(标准轮询端点)organizations operation get <id> - 列出可用区域 —— 在创建租户前,先查询可配置的区域
IP Restriction
IP限制
- Manage IP allowlisting — add / update / delete CIDR entries that gate inbound access
- Toggle IP-restriction enforcement — turn the org-wide allowlist switch on or off (with lockout safety)
- Manage bypass rules — URL-pattern exceptions to IP allowlisting
- Look up the caller's public IP — answer "what's my IP?" / "what public IP does the platform see for me?" directly with ; also the safety pre-flight before enabling enforcement
ip-restriction my-ip
- 管理IP白名单 —— 添加/更新/删除控制入站访问的CIDR条目
- 切换IP限制启用状态 —— 开启或关闭组织级白名单开关(含锁定安全机制)
- 管理绕过规则 —— IP白名单的URL模式例外规则
- 查询调用者的公网IP —— 通过直接回答“我的IP是什么?”或“平台识别到我的公网IP是多少?”;同时也是启用IP限制前的安全预检步骤
ip-restriction my-ip
Audit
审计功能
Activate on both explicit audit requests and natural-language investigation intent — users rarely say "audit events" by name.
Surface boundary — this is, notuip admin audit. Every org/tenant audit ask below — including bare "audit logs", "audit history", "export the audit trail", "login history", "who did what" — is served byuip or audit-logs. Do not fall back touip admin audit <scope>(Orchestrator-operational audit, a different schema; that's theuip or audit-logsskill), even when the user's wording is generic. When the user asks what audit events / sources are available or visible, answer by runninguipath-platform— discover live, never describe from memory or the docs.uip admin audit <scope> sources
- Explicit — commands; list sources / targets / types; query, filter, paginate, or export events; CSV or per-day-JSON dump of audit history for a window.
uip admin audit - Query audit events — list event sources, filter events by source / target / type / user / status / time window at org or tenant scope
- Export audit events — chunked download from the long-term store (one call per UTC day, atomic abort on any chunk failure) as a folder of day-wise JSON files (default) or a single merged CSV via
--file-format csv - Membership / license phrasings — "who joined / left the organization", "who was made an admin", "license changes", "cross-tenant audit"
- Sign-in / authentication phrasings — "failed/successful logins", "login history for user X", "who's been signing in"
- Tenant-activity phrasings — "what happened on tenant X", "asset/queue/folder edits", "queue items processed", "job failures", "Action Center task changes", "Apps / AgentHub / Document Understanding / Integration Service / Test Manager activity"
- Cross-scope phrasings — "everything everywhere" (run the flow once per scope and present combined)
- Investigation intent (full-sentence form) — "Who deleted the X folder last Tuesday?", "Show me failed logins for user Y this month.", "What changed on tenant Z between Jan 1 and Feb 1?", "Give me the audit log for the last 30 days.", "Was the API key rotated by someone in our org?", "Export everything for compliance for Q4."
Scope routing (which phrasing →vsorg, and why) lives in audit-workflow-guide.md → Audit scope disambiguation. Critical Rule 23 governs the stop-and-ask requirement when scope is ambiguous.tenant
针对明确的审计请求和自然语言表述的调查需求均可触发——用户很少直接提及“审计事件”。
边界说明 —— 本技能使用,而非uip admin audit。 以下所有组织/租户相关的审计需求——包括“审计日志”“审计历史”“导出审计追踪”“登录历史”“操作溯源”——均通过uip or audit-logs处理。即使用户表述宽泛,也不要使用uip admin audit <scope>(属于Orchestrator操作审计,架构不同,归uip or audit-logs技能负责)。当用户询问有哪些可用的审计事件/源时,需执行uipath-platform命令获取实时信息,切勿凭记忆或文档描述作答。uip admin audit <scope> sources
- 明确命令 —— 使用命令;列出事件源/目标/类型;查询、筛选、分页或导出事件;按时间窗口导出审计历史为按天划分的JSON文件夹(默认)或单CSV文件。
uip admin audit - 查询审计事件 —— 在组织或租户层级,按事件源/目标/类型/用户/状态/时间窗口筛选事件
- 导出审计事件 —— 从长期存储中分批下载(按UTC日期分批调用,任意批次失败则终止),默认导出为按天划分的JSON文件夹,可通过参数导出为合并后的单CSV文件
--file-format csv - 成员/许可相关表述 —— “谁加入/离开组织”“谁被设为管理员”“许可变更”“跨租户审计”
- 登录/认证相关表述 —— “登录失败/成功记录”“用户X的登录历史”“谁登录过系统”
- 租户活动相关表述 —— “租户X上发生了什么”“资产/队列/文件夹编辑记录”“队列项处理情况”“任务失败记录”“Action Center任务变更”“Apps / AgentHub / Document Understanding / Integration Service / Test Manager活动记录”
- 跨层级表述 —— “所有操作记录”(在每个层级各执行一次流程,合并结果展示)
- 调查需求(完整语句形式) —— “上周二谁删除了X文件夹?”“展示本月用户Y的登录失败记录。”“租户Z在1月1日至2月1日之间有哪些变更?”“给我最近30天的审计日志。”“我们组织里有人轮换过API密钥吗?”“导出第四季度所有合规记录。”
层级路由(哪些表述对应或org层级及原因)详见audit-workflow-guide.md → 审计层级消歧义。规则23规定,当层级不明确时,必须先询问用户确认。tenant
Troubleshoot
故障排查
Activate on access/auth/identity troubleshooting — users report symptoms, not audit verbs.
- Diagnose access denied — "user can't access X", "403 on API", "new hire has no permissions" → resolve principal, check-access, inspect role assignments. Playbook: identity-troubleshoot-guide.md → Playbook 1
- Investigate login failures — "failed login attempts", "account compromised?", "suspicious sign-ins" → org-scoped audit login-history investigation. Playbook: identity-troubleshoot-guide.md → Playbook 2
- Diagnose role misconfiguration — "custom role doesn't work", "user has role but can't do X" → inspect role actions, verify scope alignment. Playbook: identity-troubleshoot-guide.md → Playbook 3
- Diagnose IP restriction lockout — "can't access platform from new office", "all users blocked" → my-ip + ip-ranges list + enforcement get. Playbook: identity-troubleshoot-guide.md → Playbook 4
- Diagnose PAT / external app failures — "API returns 401", "PAT stopped working", "external app can't authenticate" → check expiry, scopes, audit for revocation. Playbook: identity-troubleshoot-guide.md → Playbook 5
- Diagnose SMTP email delivery failures — "invitations not sending", "SMTP broken" → smtp get + smtp test
- Investigate stuck tenant operations — "tenant create not completing", "operation stuck" → poll operation status
- Identify service provisioning no-ops — "service still enabled after remove" → platform-pinned services
- Triage robot account authentication issues — "robot not authenticating" → identity vs credential model confusion
Structured diagnose capability index with failure-mode lookup and diagnostic priority ladder: diagnose/CAPABILITY.md. Quick investigation playbooks: identity-troubleshoot-guide.md.
针对访问/认证/身份相关故障排查触发——用户通常描述症状,而非使用审计术语。
- 诊断访问拒绝问题 —— “用户无法访问X”“API返回403”“新员工无权限” → 确认主体身份、查询有效权限、检查角色分配。操作手册:identity-troubleshoot-guide.md → 手册1
- 调查登录失败 —— “登录尝试失败”“账号是否被盗?”“异常登录行为” → 在组织层级审计登录历史。操作手册:identity-troubleshoot-guide.md → 手册2
- 诊断角色配置错误 —— “自定义角色无法生效”“用户拥有角色但无法执行操作X” → 检查角色权限、验证层级匹配。操作手册:identity-troubleshoot-guide.md → 手册3
- 诊断IP限制锁定问题 —— “无法从新办公室访问平台”“所有用户被阻断” → 查询自身IP + IP范围列表 + 限制启用状态。操作手册:identity-troubleshoot-guide.md → 手册4
- 诊断PAT/外部应用认证失败 —— “API返回401”“PAT失效”“外部应用无法认证” → 检查有效期、权限范围、审计撤销记录。操作手册:identity-troubleshoot-guide.md → 手册5
- 诊断SMTP邮件发送失败 —— “邀请邮件未发送”“SMTP故障” → 获取SMTP配置 + 测试SMTP连接
- 调查停滞的租户操作 —— “租户创建未完成”“操作停滞” → 轮询操作状态
- 识别服务配置无响应问题 —— “移除服务后仍显示启用” → 平台固定服务相关问题
- 排查机器人账号认证问题 —— “机器人无法认证” → 区分身份模型与凭证模型的混淆
结构化诊断能力索引,含故障模式查询和诊断优先级顺序:diagnose/CAPABILITY.md。快速调查手册:identity-troubleshoot-guide.md。
Critical Rules
核心规则
Each rule is the agent contract. Per-area detail is in the linked reference files.
每条规则均为Agent执行约定。各领域详细说明见链接的参考文件。
Universal
通用规则
- Route Orchestrator-specific role/permission requests to (
uip or rolesskill).uipath-platformdoes NOT own Orchestrator's role catalog. Conversely, all organization/tenant audit is owned HERE and served byuip admin authorization(uip admin audit <scope>/sources/events) — NEVER useexportfor audit events, audit history, audit export, login history, compliance dumps, or "who did what/where" requests.uip or audit-logsis a different surface (Orchestrator-operational audit —uip or audit-logscolumns,Component,User,Action,Operation,Timereturns a CSV; the--exportskill). If you reach foruipath-platformon any org/tenant audit ask, stop and switch touip or audit-logs.uip admin audit - Verify login first. . If not logged in, stop and ask the user to run
uip login status --output json— it opens an interactive browser flow, so never launch it yourself in an automated or non-interactive session (sessions authenticated via env vars are already logged in). Org id is resolved from the active session.uip login - Use on every command. Parse programmatically; present conversationally.
--output json - Stop on error. Show the error verbatim. Never retry auth failures — ask the user to .
uip login - Resolve every named principal before high-risk ops. Any command that touches a named user / group / robot account / external app — ,
roles assignments create/delete,users delete,groups delete,groups members add/revoke,robot-accounts delete,external-apps delete— MUST first search the directory and echoexternal-apps generate-secretback before the mutation runs. Zero matches → stop and ask; never fall back to the current login user. Multiple matches → numbered list, wait for a digit. Procedure: role-assignment-management.md → Resolving Principal IDs.Principal: <displayName> (<userName>) — <id>
- 将Orchestrator特定的角色/权限请求路由至(
uip or roles技能)。uipath-platform不负责Orchestrator的角色目录。反之,所有组织/租户审计均由本技能负责,通过uip admin authorization(uip admin audit <scope>/sources/events命令)处理——绝不要使用export处理审计事件、审计历史、审计导出、登录历史、合规导出或“操作溯源”请求。uip or audit-logs是独立模块(Orchestrator操作审计——包含uip or audit-logs列,Component,User,Action,Operation,Time返回CSV文件;归--export技能负责)。若你在处理组织/租户审计请求时想调用uipath-platform,请立即切换为uip or audit-logs。uip admin audit - 先验证登录状态。执行。若未登录,暂停操作并提示用户执行
uip login status --output json——该命令会打开交互式浏览器流程,因此切勿在自动化或非交互式会话中自动执行(通过环境变量认证的会话已处于登录状态)。组织ID从当前活跃会话中获取。uip login - 所有命令均使用参数。以编程方式解析结果,以自然语言形式展示给用户。
--output json - 遇到错误立即停止。原样展示错误信息。认证失败切勿重试——提示用户执行。
uip login - 执行高风险操作前,先确认所有指定主体。任何涉及指定用户/群组/机器人账号/外部应用的命令——、
roles assignments create/delete、users delete、groups delete、groups members add/revoke、robot-accounts delete、external-apps delete——必须先查询目录并返回external-apps generate-secret,再执行变更操作。无匹配结果→停止并询问;切勿默认使用当前登录用户。多个匹配结果→列出编号选项,等待用户选择数字。操作流程:role-assignment-management.md → 解析主体ID。Principal: <displayName> (<userName>) — <id>
Identity
身份管理规则
- Discover before creating. before
listto avoid duplicates (robot accounts, groups, external apps —createexcepted).users invite - Secrets shown only once on external-app create and — warn the user to save immediately.
generate-secret - External apps require scopes at creation — or
--app-scopeis required (e.g.,--user-scope).--app-scope "OR.Folders" - Group membership uses user IDs. Resolve via per Rule 5, then
users list.groups members add/revoke - Confirm before delete on users / groups / robot accounts / external apps — after resolving the named target per Rule 5.
- 创建前先查询。执行命令后再执行
list,避免重复创建(机器人账号、群组、外部应用——create除外)。users invite - 密钥仅显示一次——在创建外部应用和执行命令时,提示用户立即保存密钥。
generate-secret - 创建外部应用时必须指定权限范围——需传入或
--app-scope参数(例如--user-scope)。--app-scope "OR.Folders" - 群组成员管理使用用户ID。按照规则5通过解析用户ID,再执行
users list命令。groups members add/revoke - 删除用户/群组/机器人账号/外部应用前需确认——按照规则5解析目标主体后,再执行删除操作。
Authz
授权管理规则
- Built-in roles are read-only. Only roles can be created / updated / deleted. CLI also rejects authoring against service-managed and platform-level services. Service lists: role-management.md → Services That Manage Their Own Roles.
Custom - /
roles createare PUT-style upserts. Body is assembled from inline flags +roles update. Always--file ./actions.jsonfirst before updating — omitted flags overwrite that field.roles get - infers scope (e.g.,
--service→--service studio;Tenant→--service apps). Combine withOrganizationonly to override. Never guess a--scope— the valid values and the command that re-derives them: permission-catalog.md →serviceNameserviceNames.--service - Listing works for every service; authoring is what's blocked. and
roles list --service <svc>accept every service. For effective access on a principal useroles assignments list --service <svc>(PDP).check-access - Scope vocab differs across verbs. :
roles create --scope.Organization|TenantGlobal|Tenant|Project: those +roles assignments create --scope.Folder|App: excludesroles assignments list --scope.TenantGlobal: onlycheck-access --scope.Tenant|Folder - MUST resolve the principal first per Rule 5 —
roles assignments create/deleteis a raw UUID the CLI does not name-check.--identity-id - MUST match the role's
roles assignments createto the scope-path service segment.ownerServiceName→ no service segment (CentralizedAccessor/); anything else → path must include/tenant/<tid>. Display-name mapping (e.g.,lowercase(ownerServiceName)→ "IXP") + full procedure: role-assignment-management.md → Validate Role's Owning Service.Reinfer
- 内置角色为只读。仅角色可创建/更新/删除。CLI也拒绝修改服务托管和平台级服务的角色。服务列表:role-management.md → 自行管理角色的服务。
Custom - /
roles create为PUT风格的更新操作。请求体由命令行参数 +roles update组合而成。更新前必须先执行--file ./actions.json——未传入的参数会覆盖对应字段。roles get - 参数推断层级(例如
--service→--service studio;Tenant→--service apps)。仅需在覆盖默认层级时搭配Organization参数。切勿猜测--scope——有效值及重新获取命令:permission-catalog.md →serviceName服务名称。--service - 所有服务均支持查询;仅部分服务支持编辑。和
roles list --service <svc>支持所有服务。查询主体有效权限使用roles assignments list --service <svc>(PDP)。check-access - 不同命令的层级术语不同。的可选值:
roles create --scope。Organization|TenantGlobal|Tenant|Project的可选值:上述值 +roles assignments create --scope。Folder|App的可选值:排除roles assignments list --scope。TenantGlobal的可选值:仅check-access --scope。Tenant|Folder - 必须先按照规则5解析主体——
roles assignments create/delete为原始UUID,CLI不会自动验证名称。--identity-id - 必须确保角色的
roles assignments create与层级路径的服务段匹配。ownerServiceName→无服务段(CentralizedAccess或/);其他角色→路径必须包含小写的/tenant/<tid>。显示名称映射(例如ownerServiceName→"IXP")+完整流程:role-assignment-management.md → 验证角色所属服务。Reinfer
OMS
OMS管理规则
- Async lifecycle: auto-poll, then hand off. return
tenants create/update/delete/enable/disable. Auto-polloperationId3× at 5 s; on terminal status stop and report; still in-progress after 3 polls → numbered menu, never indefinite loop.organizations operation get <OP_ID>andorganizations createare not exposed by the CLI — Portal / support flow only. Procedure: organization-management.md → Polling procedure.organizations delete - is soft-only. No hard-delete flag; restoration is via support.
tenants delete - Tenant commands default to the login tenant. Always pass an explicit for destructive ops (
<TENANT_ID>,tenants delete,tenants disable).tenants services remove - Resolve region before tenant create. is required on
--region— runtenants createfirst. Tenant service catalog is region-aware.organizations regions list - /
services disablemay no-op despite Success on certain services. Always re-list after mutating. Gap list: tenants-commands.md → Concepts.remove
- 异步生命周期:自动轮询,然后移交用户。返回
tenants create/update/delete/enable/disable。自动轮询operationId3次,每次间隔5秒;若返回终端状态则停止并报告;3次轮询后仍未完成→列出编号选项,切勿无限循环。organizations operation get <OP_ID>和organizations create未在CLI中开放——仅支持通过门户/支持流程操作。操作流程:organization-management.md → 轮询流程。organizations delete - 仅为软删除。无硬删除参数;恢复需通过支持流程。
tenants delete - 租户命令默认使用当前登录租户。执行破坏性操作(、
tenants delete、tenants disable)时,必须传入明确的tenants services remove。<TENANT_ID> - 创建租户前先解析区域。必须传入
tenants create参数——先执行--region。租户服务目录与区域相关。organizations regions list - 针对部分服务,/
services disable可能返回成功但无实际效果。执行变更操作后需重新查询确认。问题列表:tenants-commands.md → 概念。remove
Audit
审计规则
- Disambiguate vs
orgscope before querying. If the prompt is vague AND no prior turn fixed the scope, stop and ask once (a single clarifying question — use AskUserQuestion when available) — never silently default totenantor any single scope. If you genuinely cannot get an answer (non-interactive run) and must proceed, query both scopes and combine the results rather than guessing one — silently picking a single scope is the failure mode. Scope is a positional subgroup, NOT a flag: writetenant/uip admin audit org sources— there is nouip admin audit tenant eventsoption (--scopeis invalid). Routing table (user-phrasing → scope + why it lives where) and investigation playbooks: audit-workflow-guide.md → Audit scope disambiguation.audit sources --scope organization - returns an object, not a bare array. Shape is
audit <scope> events. Do not index{auditEvents, next, previous}; readData[0]. Cursor semantics are chronological:Data.auditEvents[]= newer events,next= older events. The default newest-backward walk followsprevious.previous - paginates internally — never loop on
--limit/--from-dateto "paginate". The server clamps--to-datetomaxCountper request; when the user wants more than 200, the CLI fetches[10, 200]pages under the hood. Passceil(N/200)(or larger, up to the 10000 maximum) — do NOT re-implement pagination in the agent.--limit 500must be in--limit; a bigger value is rejected up front with[1, 10000], so never pass an arbitrarily huge number to mean "everything" — for that, omitResult: "ValidationError"or stay within the range.--limit - Discover via first — never invent source / target / type GUIDs. The catalog response gives the GUIDs you pass to
audit <scope> sources. This is also the answer to "what audit events / sources can I see?" — runevents --source / --target / --typeand report the live catalog; do not answer conceptually from memory or the reference docs.audit <scope> sources - Bound the time window, ISO 8601 in UTC. Don't call without
audit <scope> eventsand--from-dateon a noisy tenant. Accepted formats: date-only (--to-date) or with time (2026-04-01).2026-04-01T14:30:00Zis inclusive of the exact instant — to capture a full final day, pass the start of the next day or--to-date. This next-day trick is forT23:59:59.999Zonly —eventsbounds are whole days (Rule 30). Resolve relative phrases ("yesterday", "last 7 days") against the actual current UTC date (e.g.export) — never guess dates — and echo the resolved window in your reply. 27b. "No matching event" is a complete answer — never name an actor the evidence does not support. An audit trail is evidence, so attributing an action to the wrong person is worse than returning nothing. If the targeted query comes back empty, say so plainly, state what you searched (scope, source/target/type, window), and offer a next step (widen the window, try the other scope, check the resource ever existed). Never promote an actor from an adjacent event — a different resource, a different event type, or a broaddate -uhit — into the answer, and do not keep loosening filters until something returns and then present that as the culprit. Only name an actor when the cited event matches both the resource and the verb asked about, quoting--searchplus the identifyingcreatedOnfield so the user can verify it. Detail: audit-workflow-guide.md → Step 5.eventDetails - is silently ignored on
--tenant-id-scoped audit commands. If you find yourself reaching for it onorg, switch toaudit org eventsinstead.audit tenant - On 401 from audit, do NOT retry. The token is missing the scope; tell the user to
Audit.Read. 29b. On a 5xx from audit, DO retry — the envelope tells you so.uip logout && uip login/ErrorCode: server_error(e.g.Retry: RetryLater,HTTP 503: no healthy upstream) is a transient, not a bad request. Re-run the same query up to two more times with a few seconds of backoff before reporting failure — changingHTTP 504or the window between attempts is not a fix and only obscures the cause. Retry immediately-and-once is usually not enough; wait between attempts. Never write or present an error envelope as if it were the result — if the user asked you to save the JSON, saving--limitto that file is a failed retrieval, not a result. Report the failure explicitly instead.{"Result":"Failure",...} - writes into a base directory (
audit <scope> export): a uniquely-named folder of day-wise JSON files (default) or a single merged CSV.--output-path,--from-date, and--to-dateare all required. Export dates are whole UTC days, inclusive on both ends (the server truncates times to the calendar day):--output-pathexports all of January; a single day is--from-date 2026-01-01 --to-date 2026-01-31with the same date. Do not apply the--from-date X --to-date Xnext-day trick here — a next-dayeventsexports an extra full day.--to-dateis a base directory (created if missing) — pass a directory only, never a filename or extension; the CLI creates a uniquely-named--output-pathoutput inside it (folder foraudit_<from>_<to>_<generated-at>,jsonfor.csv), so repeated exports of the same window never collide. Do not hand-craft the per-export name.csvselects the shape:--file-format <json|csv>(default) = a folder ofjsonfiles;<YYYY-MM-DD>.json= one merged CSV — pickcsvfor a flat spreadsheet/Excel-friendly dump,csvfor per-day files. If the user named a destination folder, pass it verbatim asjson— no confirmation needed; confirm first only when you had to pick a default (e.g.--output-path) yourself. Then report the generated./audit-exports(andPath) from the result.GeneratedAt
- 查询前先明确或
org层级。若提示模糊且之前未确定层级,必须询问用户一次(仅一个澄清问题——使用AskUserQuestion功能)——切勿默认使用tenant或其他单一层级。若确实无法获取答案(非交互式运行)且必须继续,则查询两个层级并合并结果,而非猜测单一层级——默认选择单一层级属于错误操作。层级为位置参数,而非标志位:正确写法为tenant/uip admin audit org sources——无uip admin audit tenant events参数(--scope无效)。路由表(用户表述→层级及原因)和调查手册:audit-workflow-guide.md → 审计层级消歧义。audit sources --scope organization - 返回对象,而非纯数组。结构为
audit <scope> events。切勿直接索引{auditEvents, next, previous};需读取Data[0]。游标语义按时间顺序:Data.auditEvents[]=更新的事件,next=更早的事件。默认从最新事件开始遍历,需使用previous游标。previous - 参数内部处理分页——切勿通过循环
--limit/--from-date实现“分页”。服务器限制每次请求的--to-date为maxCount;当用户需要超过200条记录时,CLI会自动获取[10, 200]页数据。传入ceil(N/200)(或更大值,最大为10000)——切勿在Agent中重新实现分页逻辑。--limit 500必须在--limit范围内;超出范围会直接返回[1, 10000],因此切勿传入极大值表示“所有记录”——若需获取所有记录,可省略Result: "ValidationError"或保持在范围内。--limit - 先通过查询——切勿自行编造事件源/目标/类型的GUID。目录响应会返回可传入
audit <scope> sources的GUID。这也是回答“我能查看哪些审计事件/源?”的方式——执行events --source / --target / --type并报告实时目录;切勿凭记忆或参考文档进行概念性回答。audit <scope> sources - 限制时间窗口,使用UTC时区的ISO 8601格式。对于活跃租户,调用时必须传入
audit <scope> events和--from-date。支持格式:仅日期(--to-date)或带时间(2026-04-01)。2026-04-01T14:30:00Z包含指定时刻——若需包含完整的最后一天,传入次日起始时间或--to-date。此技巧仅适用于T23:59:59.999Z命令——events命令的时间范围为完整日期(规则30)。解析相对表述(“昨天”“最近7天”)需基于当前UTC日期(例如export)——切勿猜测日期——并在回复中明确解析后的时间窗口。 27b. “无匹配事件”为有效答案——切勿在无证据的情况下指定操作者。审计追踪为证据,错误归因比返回空结果更严重。若目标查询无结果,直接告知用户,说明搜索范围(层级、事件源/目标/类型、时间窗口),并提供下一步建议(扩大时间窗口、尝试另一层级、检查资源是否存在)。切勿从相邻事件(不同资源、不同事件类型或宽泛date -u结果)中提取操作者作为答案,也不要不断放宽筛选条件直到返回结果并将其作为问题原因。仅当事件同时匹配查询的资源和操作时,才可指定操作者,并引用--search和识别性createdOn字段供用户验证。详细说明:audit-workflow-guide.md → 步骤5。eventDetails - 层级审计命令会忽略
org参数。若你在执行--tenant-id时想传入该参数,请切换为audit org events命令。audit tenant - 审计命令返回401时,切勿重试。令牌缺少权限;提示用户执行
Audit.Read。 29b. 审计命令返回5xx时,需重试——响应信息会提示。uip logout && uip login/ErrorCode: server_error(例如Retry: RetryLater、HTTP 503: no healthy upstream)为临时错误,而非请求错误。使用相同查询最多重试两次,每次间隔几秒;若仍失败则报告错误——重试时修改HTTP 504或时间窗口无法解决问题,只会掩盖原因。仅立即重试一次通常不足;需等待间隔后重试。切勿将错误响应作为结果展示——若用户要求保存JSON,将--limit保存至文件属于获取失败,而非有效结果。需明确报告失败情况。{"Result":"Failure",...} - 将内容写入基础目录(
audit <scope> export):默认生成按天划分的JSON文件的唯一命名文件夹,或合并后的单CSV文件。--output-path、--from-date和--to-date均为必填参数。导出日期为完整UTC日期,两端均包含(服务器会截断时间至日历日):--output-path导出整个1月的数据;单天导出需传入--from-date 2026-01-01 --to-date 2026-01-31。切勿对--from-date X --to-date X命令使用export的次日技巧——传入次日events会多导出一整天的数据。--to-date为基础目录(不存在则自动创建)——仅传入目录,切勿传入文件名或扩展名;CLI会在该目录下创建唯一命名的--output-path输出(audit_<from>_<to>_<generated-at>格式为文件夹,json格式为csv文件),因此同一时间窗口的重复导出不会冲突。切勿手动指定导出文件名。**.csv**选择输出格式:--file-format <json|csv>(默认)=按天划分的json文件;<YYYY-MM-DD>.json=合并后的单CSV文件——如需扁平表格/Excel友好格式选择csv,如需按天文件选择csv。若用户指定了目标目录,直接传入json无需确认;仅当你自行选择默认目录(例如--output-path)时需先确认。然后报告结果中的./audit-exports(和Path)。GeneratedAt
IP Restriction
IP限制规则
- is lockout-sensitive — prompt + impact statement required. Run
enforcement enableand verify the caller's IP is covered by an entry inip-restriction my-ip. Then prompt the user with the impact before flipping: "After enabling IP restriction, any caller (Portal, CLI, robot, external app) whose source IP is not inip-ranges listwill be blocked from this org. Misconfiguration locks you out and requires platform-side recovery. Proceed?"ip-ranges listis required;--confirmwhile enforcement is on also requiresip-ranges delete. Procedure: enforcement-management.md.--confirm - Recovery from IP lockout requires platform-side action. No CLI bypass — either access from an in-allowlist IP and , or use the Portal recovery flow.
enforcement disable - "APMS" is internal — never expose to the user. "APMS" (Access Policy Management Service) is the platform's internal name for IP Restriction. Use "IP Restriction" in every user-facing surface.
- 涉及锁定风险——需提示+影响说明。执行
enforcement enable并验证调用者IP在ip-restriction my-ip的条目内。然后向用户提示影响,再执行启用操作:“启用IP限制后,任何源IP不在ip-ranges list中的调用者(门户、CLI、机器人、外部应用)将无法访问本组织。配置错误会导致锁定,需平台端恢复。是否继续?” 必须传入ip-ranges list参数;在启用限制状态下执行--confirm也需传入ip-ranges delete。操作流程:enforcement-management.md。--confirm - IP锁定恢复需平台端操作。无CLI绕过方式——要么从白名单IP访问并执行,要么使用门户恢复流程。
enforcement disable - “APMS”为内部术语——切勿向用户暴露。“APMS”(Access Policy Management Service)是IP限制的平台内部名称。用户交互中统一使用“IP限制”。
What NOT to Do
禁止操作
- Never delete built-in groups. groups cannot be deleted. Only custom groups.
type: "BuiltIn" - Never pass IDs as flags. Resource IDs and names are positional arguments: , NOT
groups members add <GROUP_ID> --user-ids .... Same for all--group-id <GROUP_ID>,get,update,deletesubcommands.create - Do NOT assume audit returns a bare array. It's
events.{auditEvents, next, previous} - Do NOT loop on /
--from-dateto "paginate". Bump--to-dateand the CLI handles cursor pagination internally.--limit - Do NOT silently default audit scope to or
tenantwhen the prompt is ambiguous. Ask once, then proceed.org - Do NOT invent audit source/target/type GUIDs. Always discover via first.
sources - Do NOT call audit with no time bound on a noisy tenant — default to a bounded window.
events - Do NOT pass to
--tenant-id-scoped audit commands — it's silently ignored.org - Do NOT retry on 401 auth errors. The token is missing the required scope (for audit). Tell the user to
Audit.Read. 9a. Do NOT save or report an audit error envelope as data. Auip logout && uip loginpayload is a failed call — retry a 5xx (Rule 29b), fix a{"Result":"Failure"|"ValidationError", ...}, and never leave it in a file the user asked you to fill with results. 9b. Do NOT name a culprit an audit query did not return. If the targeted search is empty, report "no matching event found" — never borrow an actor from an adjacent or broader-search event (Rule 27b).ValidationError - Do NOT call with only the flag you want to change. Re-fetch first; the upsert body overwrites omitted fields (Rule 12).
roles update - Do NOT present authz results without provenance — role name, ,
scopeType, tenant-binding (names not UUIDs). Detail: authorization-commands.md → Provenance contract.ownerServiceName - Do NOT conflate provisioned services with the available catalog. returns provisioned with status;
services listis the catalog. Present them as separate sections.services list-available - Do NOT run an OMS mutation without naming the target. Echo org name / tenant name + UUID / service type + region before running.
- Do NOT pass the next day as on audit
--to-dateto "include the final day" — export bounds are already whole-day inclusive (Rule 30); the next-day trick is forexportonly and would export an extra day.events
- 切勿删除内置群组。的群组无法删除。仅可删除自定义群组。
type: "BuiltIn" - 切勿将ID作为标志位参数传入。资源ID和名称为位置参数:例如,而非
groups members add <GROUP_ID> --user-ids ...。所有--group-id <GROUP_ID>、get、update、delete子命令均遵循此规则。create - 切勿假设返回纯数组。返回结构为
audit events。{auditEvents, next, previous} - 切勿通过循环/
--from-date实现“分页”。增大--to-date参数,CLI会自动处理游标分页。--limit - 当提示模糊时,切勿默认审计层级为或
tenant。先询问用户,再继续操作。org - 切勿自行编造审计事件源/目标/类型的GUID。必须先通过查询获取。
sources - 对于活跃租户,切勿无时间限制调用——默认使用有限时间窗口。
audit events - 切勿向层级审计命令传入
org参数——该参数会被忽略。--tenant-id - 认证错误返回401时,切勿重试。令牌缺少所需权限(审计需)。提示用户执行
Audit.Read。 9a. 切勿将审计错误响应保存或报告为数据。uip logout && uip login为调用失败——5xx错误需重试(规则29b),{"Result":"Failure"|"ValidationError", ...}需修正请求,切勿将其保存至用户要求填充结果的文件中。 9b. 切勿在审计查询无结果的情况下指定操作者。若目标搜索无结果,报告“未找到匹配事件”——切勿从相邻或宽泛搜索结果中提取操作者(规则27b)。ValidationError - 切勿仅传入需修改的参数执行。先重新获取角色信息;更新操作会覆盖未传入的字段(规则12)。
roles update - 切勿展示无来源信息的授权结果——需包含角色名称、、
scopeType、租户绑定(名称而非UUID)。详细说明:authorization-commands.md → 来源约定。ownerServiceName - 切勿混淆已配置服务与可用目录。返回已配置服务及状态;
services list返回可用目录。需分开展示。services list-available - 执行OMS变更操作前,必须明确目标。执行前需回显组织名称/租户名称+UUID/服务类型/区域。
- 切勿对传入次日作为
audit export以“包含最后一天”——导出范围已为完整日期(规则30);次日技巧仅适用于--to-date命令,会导致多导出一天数据。events
Quick Start
快速入门
One row per common goal. Per-area workflows are in the reference files.
| Goal | Entry command(s) |
|---|---|
| Invite a user → assign to group | user-management.md + group-management.md |
| Create a custom role | |
| Grant permission(s) to a principal ("grant me X", "give alice Y, Z") | grant-permissions.md — intersection-and-menu flow |
| Assign a role to a principal | (1) Resolve principal per Rule 5. (2) |
| See what a principal can do | |
| Create a tenant | tenant-management.md — region + default-services resolution, file-body shape, operation polling (Rule 18) |
| Add a tenant service | |
| Look up my public IP ("what's my IP?", "what public IP does the platform see for me?") | |
| Enable IP allowlist enforcement | |
| Query audit events / export | audit-workflow-guide.md — scope disambiguation + 4 investigation playbooks (who-did-X, login history, date-range dump, overview) |
每行对应一个常见目标。各领域工作流见参考文件。
| 目标 | 入口命令 |
|---|---|
| 邀请用户并分配至群组 | user-management.md + group-management.md |
| 创建自定义角色 | |
| 为主体授予权限(“授予我权限X”“为Alice分配权限Y、Z”) | grant-permissions.md —— 交叉流程及菜单选择 |
| 为主体分配角色 | (1) 按照规则5解析主体。(2) |
| 查看主体可执行的操作 | |
| 创建租户 | tenant-management.md —— 区域+默认服务解析、文件结构、操作轮询(规则18) |
| 添加租户服务 | |
| 查询我的公网IP(“我的IP是什么?”“平台识别到我的公网IP是多少?”) | |
| 启用IP白名单限制 | |
| 查询审计事件/导出 | audit-workflow-guide.md —— 层级消歧义+4个调查手册(操作溯源、登录历史、日期范围导出、概览) |
Key Concepts
核心概念
Organization hierarchy
组织层级
Organization (org)
└── Partition (= org in most cases)
├── Users ← human identities
├── Groups ← role containers (BuiltIn + Custom)
├── Robot Accounts ← unattended automation identities
└── External Apps ← OAuth2 clients (Client ID + Secret)Organization (组织)
└── Partition(多数情况下等同于组织)
├── Users ← 人工身份
├── Groups ← 角色容器(内置+自定义)
├── Robot Accounts ← 无人值守自动化身份
└── External Apps ← OAuth2客户端(客户端ID+密钥)Robot accounts vs external apps
机器人账号 vs 外部应用
| Concept | Purpose | Managed by |
|---|---|---|
| Robot account | Identity — who the robot is | Identity Server ( |
| Robot credentials | Per-robot Client ID + Secret for machine auth | Orchestrator (machine connection) |
| External app | OAuth2 client for API integrations, CI/CD | Identity Server ( |
Robot credentials are provisioned automatically by Orchestrator on machine connect — not by creating external apps.
| 概念 | 用途 | 管理方 |
|---|---|---|
| 机器人账号 | 身份标识——机器人的身份 | Identity Server( |
| 机器人凭证 | 每台机器人的客户端ID+密钥,用于机器认证 | Orchestrator(机器连接) |
| 外部应用 | 用于API集成、CI/CD的OAuth2客户端 | Identity Server( |
机器人凭证由Orchestrator在机器连接时自动配置——无需创建外部应用。
Output Etiquette
输出规范
What to surface after each verb. Per-area detail in the reference files; this is the contract.
| Area | Always surface |
|---|---|
| Identity mutations | Result + new resource id; for external-app create / |
| Authz reads + mutations | Provenance: role name, |
| OMS reads | Separate provisioned (with status) from available catalog (no status). Lead with |
| OMS mutations | Echo the resolved target before running (Anti-pattern 13). Async: auto-poll 3× at 5 s, then numbered menu (Rule 18). Sync services: re-list to verify post-state (Rule 22). |
| Audit queries | Disambiguate |
| IP Restriction mutations | Before |
For per-area full checklists, follow the table's inline links: Identity → identity-commands.md; Authz → authorization-commands.md; Audit → audit-workflow-guide.md.
每个操作后需展示的内容。各领域详细说明见参考文件,此为执行约定。
| 领域 | 必须展示的内容 |
|---|---|
| 身份管理变更操作 | 结果+新资源ID;创建外部应用或执行 |
| 授权管理查询+变更操作 | 来源信息:角色名称、 |
| OMS查询操作 | 区分已配置服务(含状态)与可用目录(无状态)。开头展示 |
| OMS变更操作 | 执行前回显解析后的目标(反模式13)。异步操作:自动轮询3次,每次间隔5秒,然后提供编号菜单(规则18)。同步服务:重新查询验证后续状态(规则22)。 |
| 审计查询操作 | 先明确 |
| IP限制变更操作 | 执行 |
各领域完整检查清单,见表格内联链接:身份管理→identity-commands.md;授权管理→authorization-commands.md;审计→audit-workflow-guide.md。
Task Navigation
任务导航
| I need to... | Read first |
|---|---|
| Identity CLI reference | references/identity-commands.md |
| Manage users (list / create / invite / update / delete) | references/user-management.md |
| Manage groups (CRUD + membership) | references/group-management.md |
| Manage robot accounts | references/robot-account-management.md |
| Manage external apps (OAuth2 + secrets + federated credentials) | references/external-app-management.md |
| Manage personal access tokens (PATs) | references/pat-management.md |
| Configure SMTP email settings | references/smtp-management.md |
| Authorization CLI reference | references/authorization/authorization-commands.md |
| Manage custom roles | references/authorization/role-management.md |
| Grant permission(s) to a principal — scope/service intersection flow | references/authorization/grant-permissions.md |
| Manage role assignments (incl. role-service vs scope-path validation, Rule 17) | references/authorization/role-assignment-management.md |
| List permission definitions | references/authorization/permission-catalog.md |
| Check effective access for a principal | references/authorization/check-access.md |
| Organizations CLI reference | references/organizations-commands.md |
| Tenants CLI reference | references/tenants-commands.md |
| Manage the organization (read + update, polling, regions, org services read-only) | references/organization-management.md |
| Manage tenants (CRUD, enable/disable, tenant services) | references/tenant-management.md |
| IP-restriction CLI reference | references/ip-restriction/ip-restriction-commands.md |
| Manage IP allowlist entries | references/ip-restriction/ip-range-management.md |
Toggle enforcement (+ | references/ip-restriction/enforcement-management.md |
| Manage bypass rules | references/ip-restriction/bypass-rule-management.md |
| Audit CLI reference | references/audit-commands.md |
| Audit investigation workflows (scope disambiguation, who-did-X, login history, date-range dump, overview) | references/audit-workflow-guide.md |
| Paginate audit events beyond 200 | references/audit-commands.md + Rule 25 |
| Troubleshoot access denied, login failures, role misconfig, IP lockout, PAT/app auth | references/identity-troubleshoot-guide.md |
| Diagnose capability index (structured) | references/diagnose/CAPABILITY.md |
| Failure mode lookup (12 named patterns) | references/diagnose/references/failure-modes.md |
| Diagnostic priority ladder (sequential triage) | references/diagnose/references/troubleshooting-guide.md |
| 我需要... | 先阅读 |
|---|---|
| 身份管理CLI参考 | references/identity-commands.md |
| 管理用户(列出/创建/邀请/更新/删除) | references/user-management.md |
| 管理群组(增删改查+成员) | references/group-management.md |
| 管理机器人账号 | references/robot-account-management.md |
| 管理外部应用(OAuth2+密钥+联合凭证) | references/external-app-management.md |
| 管理个人访问令牌(PAT) | references/pat-management.md |
| 配置SMTP邮件设置 | references/smtp-management.md |
| 授权管理CLI参考 | references/authorization/authorization-commands.md |
| 管理自定义角色 | references/authorization/role-management.md |
| 为主体授予权限——范围/服务交叉流程 | references/authorization/grant-permissions.md |
| 管理角色分配(含角色服务与层级路径验证,规则17) | references/authorization/role-assignment-management.md |
| 列出权限定义 | references/authorization/permission-catalog.md |
| 查询主体有效权限 | references/authorization/check-access.md |
| 组织管理CLI参考 | references/organizations-commands.md |
| 租户管理CLI参考 | references/tenants-commands.md |
| 管理组织(读取+更新、轮询、区域、组织服务只读) | references/organization-management.md |
| 管理租户(增删改查、启用/禁用、租户服务) | references/tenant-management.md |
| IP限制CLI参考 | references/ip-restriction/ip-restriction-commands.md |
| 管理IP白名单条目 | references/ip-restriction/ip-range-management.md |
切换限制启用状态(含 | references/ip-restriction/enforcement-management.md |
| 管理绕过规则 | references/ip-restriction/bypass-rule-management.md |
| 审计CLI参考 | references/audit-commands.md |
| 审计调查工作流(层级消歧义、操作溯源、登录历史、日期范围导出、概览) | references/audit-workflow-guide.md |
| 分页查询超过200条审计事件 | references/audit-commands.md + 规则25 |
| 排查访问拒绝、登录失败、角色配置错误、IP锁定、PAT/应用认证问题 | references/identity-troubleshoot-guide.md |
| 结构化诊断能力索引 | references/diagnose/CAPABILITY.md |
| 故障模式查询(12种命名模式) | references/diagnose/references/failure-modes.md |
| 诊断优先级顺序(顺序排查) | references/diagnose/references/troubleshooting-guide.md |