Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ConnectionSettings.ConnectAsUserName Property

Gets or sets the name of the user when connecting using impersonation.

Namespace:  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)
public string ConnectAsUserName { get; set; }

Property Value

Type: System.String
A String value that specifies the user name used when the connection is established using impersonation of a user.

If the ConnectAsUser property is set to True, the ConnectAsUserName property and the ConnectAsUserPassword property are used to acquire credentials for impersonation. Any subsequent connection is made with the credentials of the specified user, and the LoginSecure property, the Login property, and the Password property are ignored.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.