activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

工作流活动

上次更新日期 2026年3月9日

设置凭据

用于更新指定凭据资产的值,该资产已在 Orchestrator 中可用,无论是全局资产还是一个机器人资产。单击此处以获取有关资产的详细信息

请注意,要执行此方法,机器人角色需要对资产具有编辑权限。运行此方法时,它将使用与执行该方法的机器人相同的身份验证上下文,并继承其权限。

定义

命名空间: UiPath.Activities.System.API

程序集: UiPath.System.Activities.Api(在 UiPath.System.Activities.Api.dll 中)

重载

SetCredential(String, String, String)更新指定凭据资产的值。
SetCredential(String, String, String, String)在指定的 Orchestrator 文件夹路径中更新指定凭据资产的值。
SetCredential(String, String, String, String, Int32)在指定的 Orchestrator 文件夹路径中更新指定凭据资产的值,并配置 TimeoutMS

SetCredential(String, String, String, String, Int32)

在指定的 Orchestrator 文件夹路径中更新指定凭据资产的值,并配置 TimeoutMS

void SetCredential(
    string userName,
    string password,
    string credentialName
)
void SetCredential(
    string userName,
    string password,
    string credentialName
)

userName String :指定凭据资产的新用户名。

password String :指定凭据资产的新密码。

credentialName String :要更新的凭据资产的名称。该名称必须与 Orchestrator 中的名称完全相同,且要使用相同的大小写。

SetCredential(String, String, String, String)

在指定的 Orchestrator 文件夹路径中更新指定凭据资产的值。

void SetCredential(
    string userName,
    string password,
    string credentialName,
    string folderPath
)
void SetCredential(
    string userName,
    string password,
    string credentialName,
    string folderPath
)

userName String :指定凭据资产的新用户名。

password String :指定凭据资产的新密码。

credentialName String :要更新的凭据资产的名称。该名称必须与 Orchestrator 中的名称完全相同,且要使用相同的大小写。

folderPath String :凭据资产所在的文件夹路径(可能与运行流程的文件夹不同)。此字段仅支持字符串值,并使用/作为分隔符来表示子文件夹。例如"Finance/Accounts Payable"

SetCredential(String, String, String, String, Int32)

在指定的 Orchestrator 文件夹路径中更新指定凭据资产的值,并配置 TimeoutMS

void SetCredential(
    string userName,
    string password,
    string credentialName,
    string folderPath,
    int timeoutMS
)
void SetCredential(
    string userName,
    string password,
    string credentialName,
    string folderPath,
    int timeoutMS
)

userName String :指定凭据资产的新用户名。

password String :指定凭据资产的新密码。

credentialName String :要更新的凭据资产的名称。该名称必须与 Orchestrator 中的名称完全相同,且要使用相同的大小写。

folderPath String :凭据资产所在的文件夹路径(可能与运行流程的文件夹不同)。此字段仅支持字符串值,并使用/作为分隔符来表示子文件夹。例如"Finance/Accounts Payable"

timeoutMS Int32 :指定等待时间(以毫秒为单位),如果超出该时间后活动并未运行,系统便会抛出错误。默认值为 30000 毫秒(30 秒)。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新