Delete Credential fail

Hello everyone
I want to switch Windows credentials and access multiple file sharing servers.
With Add Crerential Activity, Windows credentials are correctly added,
After that Delete Crerential Activity will not delete Windows credentials.

If Credential Type is “General”, Add & Delete is possible, but if Credential Type is “DomainPassword”
Can only add.

How can I delete Windows credentials using Delete Crerential Activity?

その後UiPath Help Deskより回答を頂きました。
結論から言うと、Domain CredentialsについてApplicationは
書き込む事は出来ても削除は権限上できないそうです。

UiPath Activities Guideにはそのような説明が無いので
少し疑問が残りますが、そのような仕様であればしかたありません。

Domain Credentials

The secret part of domain credentials, the password, is protected by the operating system. Only code running in-process with the LSA can read and write domain credentials. Applications are limited to writing domain credentials.

Generic Credentials

Credentials Management provides customizable cache management and long-term storage for generic credentials. Generic credentials can be read and written by user processes.

Please refer to Kinds of Credentials - Win32 apps | Microsoft Learn

So you’ll probably want to look at the persistence of the credential being Logon Session, Local Computer, or Enterprise to determine when the credential is removed if using Windows credentials.

https://docs.microsoft.com/en-us/windows/desktop/api/wincred/ns-wincred-_credentiala#members

Defines the persistence of this credential. This member can be read and written.

Value Meaning
CRED_PERSIST_SESSION
1 (0x1)
The credential persists for the life of the logon session. It will not be visible to other logon sessions of this same user. It will not exist after this user logs off and back on.
CRED_PERSIST_LOCAL_MACHINE
2 (0x2)
The credential persists for all subsequent logon sessions on this same computer. It is visible to other logon sessions of this same user on this same computer and not visible to logon sessions for this user on other computers.
CRED_PERSIST_ENTERPRISE
3 (0x3)
The credential persists for all subsequent logon sessions on this same computer. It is visible to other logon sessions of this same user on this same computer and to logon sessions for this user on other computers.

This option can be implemented as locally persisted credential if the administrator or user configures the user account to not have roam-able state. For instance, if the user has no roaming profile, the credential will only persist locally.
2 Likes