UiPath Documentation
uipath-cli
latest
false
UiPath-CLI-Benutzerhandbuch
Wichtig :
Dieser Inhalt wurde maschinell übersetzt. Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

Scopes for uip tm

The OAuth scopes each uip tm command needs when you sign in with an external application, and ready-to-use --scope lists for CI.

When you sign in with an external application, every uip tm command needs the application to hold the right Test Manager (TM.*) scopes, and some commands also need Orchestrator (OR.*) scopes. This page lists them per command, with ready-to-use --scope lists.

When scopes apply​

Sign-inWhat Test Manager checksWhat you do
User login (uip login in a browser)Your project roles and tenant permissions.No action. Scopes are not configured for a user login.
External application (uip login --client-id … --client-secret … or --client-assertion …, see Authentication)The application scopes in the access token.The external application holds the scopes on this page, and the sign-in passes an explicit --scope list.

An external application sign-in requires an explicit --scope list. Without it, Identity puts every scope the application holds into the token, and the sign-in fails once that list gets too long. Each scope in the list must be one the application was granted.

uip login --client-id env.UIPATH_CLIENT_ID --client-secret env.UIPATH_CLIENT_SECRET \
  --scope "TM.Projects TM.TestSets TM.TestExecutions OR.Folders.Read OR.Execution.Read" \
  --tenant <TENANT_NAME>
uip login --client-id env.UIPATH_CLIENT_ID --client-secret env.UIPATH_CLIENT_SECRET \
  --scope "TM.Projects TM.TestSets TM.TestExecutions OR.Folders.Read OR.Execution.Read" \
  --tenant <TENANT_NAME>

The scopes the current token carries appear in Data.Scopes of the uip login status --detailed --output json output.

How Test Manager evaluates scopes​

  • Full, read, and write scopes. TM.TestCases allows both reading and changing test cases. TM.TestCases.Read allows only GET requests, and TM.TestCases.Write allows only the others. Commands that filter or search data send a POST even when they only read data, so a .Read-only application can fail on them. The full scope covers every command; a narrower scope works only when it has been tested for every command in use.
  • Project resolution. Every command that takes --project-key, --project-id, or --test-set-key, or that falls back to the tenant's default project, also needs TM.Projects.
  • Permission requirements. A scope lets the token call the API. The application also needs the Test Manager project roles, and the Orchestrator folder roles, for the data it touches.

Test Manager scopes by command​

The base scope applies to every command in the row. The last column lists the extra scopes that specific commands or options need, or points to the conditional scopes table when a command group has several.

BefehleBase scopeExtra scopes
project (list, get-default, create, update, delete, export, import, set-default-folder, clear-default-folder, owners list, settings get, settings update), project-permissions get, migration get, migration list, migration download, export-jobs getTM.Projectsproject update --set-default: TM.Administration
migration schemas list, migration schemas downloadTM.Users (oder TM.Users.Read )–
testcases (create, list, get, update, delete, clone, export, steps, parameters, list-*, group-by, bulk-create)TM.TestCasesConditional scopes: see testcases
testsets (all commands), schedulesTM.TestSetsConditional scopes: see testsets
executions, testcaselog, teststeplog list, report get, waitTM.TestExecutionsexecutions export --wait, report export --wait: TM.Attachments
result downloadTM.TestExecutionsTM.TestSets
run --type packageTM.TestSets, TM.TestExecutionsOrchestrator scopes (next section)
requirementsTM.RequirementsConditional scopes: see requirements
attachmentTM.AttachmentsConditional scopes: see attachment
customfield (definitions)TM.CustomFieldDefinitions–
customfield label, customfield valueTM.CustomFieldValues–
objectlabelTM.ObjectLabels–
defectsTM.Defectscreate: TM.TestCases
promptsTM.Prompts–
perf-scenarioTM.PerformanceScenariosConditional scopes: see perf-scenario

Conditional Test Manager scopes​

The following commands and options need extra scopes in addition to the base scope in the previous table. An extra scope named together with an option applies only when that option is passed.

Command groupCommand or optionExtra scope
testcasesrunTM.TestSets, TM.TestExecutions
testcasesadd, remove, list-testsetsTM.TestSets
testcaseslink-automation, link-packageTM.TestExecutions
testcaseslist-automations, list-result-historyTM.TestExecutions in place of TM.TestCases
testcasesbulk-createTM.CustomFieldDefinitions (custom fields in the file), TM.Requirements (requirement links in the file)
testcasesgroup-by --field on a custom fieldTM.CustomFieldDefinitions
testcasesexport --waitTM.Attachments
testsetsrun --wait, list --include-last-executionTM.TestExecutions
testsetscreate --dynamic-labels, list-testcases, get-dynamic-assignment, set-execution-order, assign-userTM.TestCases
requirementsgenerate-testcases, evaluate, find-obsolete-testcases with --attachment-ids, and export --waitTM.Attachments
requirementsgenerate-testcases --create, find-obsolete-testcases --deleteTM.TestCases
attachmentlist --test-case-keys oder --all --object-type TestCaseTM.TestCases
attachmentlist --requirement-keys oder --all --object-type RequirementTM.Requirements
attachmentlist --all --object-type TestSetTM.TestSets
attachmentdownload --execution-idTM.TestExecutions
perf-scenarioexecute, executions list, load-groups get, load-groups list, jobs list, robot-logs listTM.PerformanceScenarioExecutions
perf-scenarioload-groups add --test-case-keyTM.TestCases
perf-scenarioload-groups add without --package-versionTM.TestExecutions

No Test Manager scope is checked for pack (it runs offline), user get, waiting on a requirement AI job (--wait, --activity-id), or the performance results commands (perf-scenario results get, http-errors list, automation-errors list, transaction-metrics list, report generate, report compare, stop), which only require a valid sign-in.

Orchestrator scopes​

Commands that look up folders, packages, users, or machines in Orchestrator also need Orchestrator scopes.

BefehleOrchestrator scopes
run --type packageOR.Folders.Read, OR.Execution.Read
testcases link-automation, testcases link-package, testcases list --automated with a folder, testsets set-folder --folder-path, testsets autoselect-packages --folder-path, testsets set-robot --robot-name, testsets set-execution-target --robot-nameOR.Folders.Read
testsets set-robot, testsets set-execution-target with --robot-user-key, or with --robot-name on a test set that has no folderOR.Users.Read
testsets set-execution-target --machine-nameOR.Machines.Read
testsets assign-user --assignee-email, testcaselog assign --assignee-emailOR.Users.Read

An external application has no personal workspace, so --folder-path takes the full folder path, or --folder-key identifies the folder.

Ready-to-use scope lists​

CI: run every test in an uploaded package​

The scopes for uip tm run --type package:

TM.Projects TM.TestSets TM.TestExecutions OR.Folders.Read OR.Execution.Read
TM.Projects TM.TestSets TM.TestExecutions OR.Folders.Read OR.Execution.Read

uip tm run does not upload the package. A pipeline that uploads it first with uip or packages upload under the same sign-in requires OR.Execution in place of OR.Execution.Read.

Every uip tm command group​

TM.Projects TM.TestCases TM.TestSets TM.TestExecutions TM.Requirements TM.Attachments TM.ObjectLabels TM.CustomFieldDefinitions TM.CustomFieldValues TM.Defects TM.Prompts TM.PerformanceScenarios TM.PerformanceScenarioExecutions OR.Folders.Read OR.Execution.Read OR.Users.Read OR.Machines.Read
TM.Projects TM.TestCases TM.TestSets TM.TestExecutions TM.Requirements TM.Attachments TM.ObjectLabels TM.CustomFieldDefinitions TM.CustomFieldValues TM.Defects TM.Prompts TM.PerformanceScenarios TM.PerformanceScenarioExecutions OR.Folders.Read OR.Execution.Read OR.Users.Read OR.Machines.Read

TM.Users is needed only for migration schemas, and TM.Administration only for project update --set-default.

Troubleshooting a 403​

A 403 from a uip tm command typically indicates a missing scope or role. Data.Scopes in the uip login status --detailed --output json output shows the scopes the token carries, to compare with the tables on this page.

Add the missing scope to the external application in Admin → External Applications and sign in again with the updated --scope list.

When every scope is present, the application lacks a Test Manager project role or an Orchestrator folder role, or the tenant lacks the license or feature the command uses. The Message field of the error identifies which.

Siehe auch​

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support(opens in new window)

Möchten Sie lernen? UiPath Academy(opens in new window)

Haben Sie Fragen? UiPath-Forum(opens in new window)

Auf dem neuesten Stand bleiben