IAdmRunAs
The IAdmRunAs interface is designed to manage credentials used to execute an operation.
Inheritance: IUnknown
Methods
-
Method
-
Description
-
CanRunAs()
-
Checks whether the given credentials are valid.
-
SetRunAs()
-
Sets the credentials to be used to execute an operation.
-
CopyDataFromLocalStorageId()
-
Copies credentials from the service local data storage with the given identifier to the service local data storage associated with the credentials represented by this interface.
-
CopyFrom()
-
Copies the given credentials to the service local data storage associated with the credentials represented by this interface.
Properties
-
Property
-
Description
-
RunAsUsername
-
Gets the username of the account used to execute an operation.
-
LocalDataStorageId
-
Gets or sets the unique identifier of the service local data storage associated with the credentials.
Details
CanRunAs()
Checks whether the given credentials are valid. If the credentials are invalid, this method throws an exception.
void CanRunAs(string principal, string password)
Exceptions
- LogonFailureException
- Username or password is invalid.
-or-
The method failed to validate the credentials.
SetRunAs()
Sets the credentials to be used to execute an operation.
void SetRunAs(string principal, string password)
Remarks
The credentials are used for outbound network connections only. For non-network operations, the credentials of the Adaxes service account are used.
CopyDataFromLocalStorageId()
Copies credentials from the service local data storage with the given identifier to the service local data storage associated with the credentials represented by this interface.
void CopyDataFromLocalStorageId(string storageId)
Parameters
The storageId parameter specifies the identifier of the service local data storage to copy credentials from.
CopyFrom()
Copies the given credentials to the service local data storage associated with the credentials represented by this interface.
void CopyFrom(IAdmRunAs src)
RunAsUsername
Gets the username of the account used to execute an operation.
- Type:
- string
- Access:
- Read-only
LocalDataStorageId
Gets or sets the unique identifier of the service local data storage associated with the credentials.
- Type:
- string
- Access:
- Read/Write
Requirements
Minimum required version: 2018.1