ILogOnServiceImpersonateAccount Method (Guid, NullableGuid)

Starts an impersonation session for the specified account.

Namespace:  Dundas.BI.AccountServices
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax
Session ImpersonateAccount(
	Guid accountId,
	Guid? tenantId
)

Parameters

accountId
Type: SystemGuid
The ID of the account to impersonate.
tenantId
Type: SystemNullableGuid
The ID of the tenant which will be associated with the impersonated session.

Return Value

Type: Session
An object representing the impersonated session.
Exceptions
ExceptionCondition
ArgumentExceptionaccountId or tenantId is Empty.
InvalidOperationException

The current session is the result of an impersonation.

-or-

The caller is attempting to impersonate their own account.

OperationFailedException Logging on as the impersonated account failed.
NotFoundExceptionThe specified account was not found.
NoPrivilegeException

The caller does not have system administration privileges.

-or-

The caller is associated with a tenant, but does not have administration privileges for that tenant.

-or-

The caller is associated with a tenant, the specified account does not belong to that tenant.

-or-

The specified non-global account is not a member of the specified tenant.

InvalidSessionExceptionThe caller context is not associated with a valid session.
See Also