@@ -50,6 +50,8 @@ public class LoginTests
5050 private string _subscriptionName = null ;
5151 private string _userName = null ;
5252 private string _password = null ;
53+ private string _applicationId = null ;
54+ private string _certificateThumbprint = null ;
5355
5456 public LoginTests ( )
5557 {
@@ -68,6 +70,8 @@ public LoginTests()
6870 _cmdlet . SubscriptionName = _subscriptionName ;
6971 _cmdlet . UserName = _userName ;
7072 _cmdlet . Password = _password ;
73+ _cmdlet . ApplicationId = _applicationId ;
74+ _cmdlet . CertificateThumbprint = _certificateThumbprint ;
7175 _cmdlet . CommandRuntime = new MockCommandRuntime ( ) ;
7276 }
7377
@@ -99,6 +103,18 @@ public void LoginWithServicePrincipal()
99103 Login ( ) ;
100104 }
101105
106+ [ Fact ]
107+ [ Trait ( Category . AcceptanceType , Category . LiveOnly ) ]
108+ public void LoginWithCertificate ( )
109+ {
110+ // REQUIRED:
111+ // _tenantId --> Id of the tenant that the service principal is registered to
112+ // _applicationId --> Application id of the service principal
113+ // _certificateThumbprint --> Thumbprint of the certificate used to authenticate the service principal
114+ _account = new AzureAccount ( ) { Type = AzureAccount . AccountType . ServicePrincipal } ;
115+ Login ( ) ;
116+ }
117+
102118 private void EnableAutosave ( IAzureSession session , bool writeAutoSaveFile , out ContextAutosaveSettings result )
103119 {
104120 var store = session . DataStore ;
0 commit comments