@@ -47,6 +47,8 @@ public class LoginTests
4747 private string _subscriptionName = null ;
4848 private string _userName = null ;
4949 private string _password = null ;
50+ private string _applicationId = null ;
51+ private string _certificateThumbprint = null ;
5052
5153 public LoginTests ( )
5254 {
@@ -65,6 +67,8 @@ public LoginTests()
6567 _cmdlet . SubscriptionName = _subscriptionName ;
6668 _cmdlet . UserName = _userName ;
6769 _cmdlet . Password = _password ;
70+ _cmdlet . ApplicationId = _applicationId ;
71+ _cmdlet . CertificateThumbprint = _certificateThumbprint ;
6872 _cmdlet . CommandRuntime = new MockCommandRuntime ( ) ;
6973 }
7074
@@ -96,6 +100,18 @@ public void LoginWithServicePrincipal()
96100 Login ( ) ;
97101 }
98102
103+ [ Fact ]
104+ [ Trait ( Category . AcceptanceType , Category . LiveOnly ) ]
105+ public void LoginWithCertificate ( )
106+ {
107+ // REQUIRED:
108+ // _tenantId --> Id of the tenant that the service principal is registered to
109+ // _applicationId --> Application id of the service principal
110+ // _certificateThumbprint --> Thumbprint of the certificate used to authenticate the service principal
111+ _account = new AzureAccount ( ) { Type = AzureAccount . AccountType . ServicePrincipal } ;
112+ Login ( ) ;
113+ }
114+
99115 private void EnableAutosave ( IAzureSession session , bool writeAutoSaveFile , out ContextAutosaveSettings result )
100116 {
101117 var store = session . DataStore ;
0 commit comments