Attempting to use a certificate to authenticate with a PowerShell script in an Azure Function App fails with: “ERROR: CertificateNotFoundInStoreOriginInfo”

Problem

You’ve completed configuring an Azure Function App with a PowerShell script that authenticates against Azure AD with Connect-AzureAD using a certificate but noticed that attempting to use the Test/Run button shows that the authentication fails with the following:

image

The full error log output is the following:

2022-02-07T12:12:42.895 [Error] ERROR: CertificateNotFoundInStoreOriginInfo : localhostException :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord : …Message : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMicrosoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: CertificateNotFoundInStoreOriginInfo : localhostException :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord : …Message : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADException: CertificateNotFoundInStoreStack:

2022-02-07T12:12:43.179 [Error] ERROR: CertificateNotFoundInStoreOriginInfo : localhostException :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord : …Message : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMicrosoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: CertificateNotFoundInStoreOriginInfo : localhostException :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord : …Message : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADException: CertificateNotFoundInStoreStack:

2022-02-07T12:12:43.269 [Information] Executed ‘Functions.Update-Compliance-Cloud-Users’ (Succeeded, Id=7e7de1c7-1674-4144-a68a-92417853733f, Duration=4742ms)

2022-02-07T12:12:47.153 [Information] Executing ‘Functions.Update-Compliance-Cloud-Users’ (Reason=’This function was programmatically called via the host APIs.’, Id=4f8eff73-c3e7-424a-9f82-96555ab7d1a2)

2022-02-07T12:12:47.266 [Warning] WARNING: Module AzureAD is loaded in Windows PowerShell using WinPSCompatSession remoting session; please note that all input and output of commands from this module will be deserialized objects. If you want to load this module into PowerShell Core please use ‘Import-Module -SkipEditionCheck’ syntax.

2022-02-07T12:12:47.642 [Error] ERROR: CertificateNotFoundInStoreOriginInfo : localhostException :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord : …Message : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMicrosoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: CertificateNotFoundInStoreOriginInfo : localhostException :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 163SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord : …Message : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADException: CertificateNotFoundInStoreStack:

2022-02-07T12:12:47.885 [Error] ERROR: CertificateNotFoundInStoreOriginInfo : localhostException :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord : …Message : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMicrosoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: CertificateNotFoundInStoreOriginInfo : localhostException :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : System.ArgumentException: CertificateNotFoundInStoreat Microsoft.Open.Azure.AD.CommonLibrary.DiskDataStore.GetCertificate(String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryDataStoreDiskDataStore.cs:line 117at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.AcquireTokenWithCertificate(AdalConfiguration config, String appId, String thumbprint) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 62at Microsoft.Open.Azure.AD.CommonLibrary.ServicePrincipalTokenProvider.GetAccessTokenWithCertificate(AdalConfiguration config, String clientId, String certificateThumbprint, AccountType credentialType) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryTokenProviderServicePrincipalTokenProvider.cs:line 40at Microsoft.Open.Azure.AD.CommonLibrary.AuthenticationFactory.Authenticate(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior, TokenCache tokenCache, Endpoint resourceId) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryAuthenticationFactory.cs:line 59at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.AcquireAccessToken(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password, ShowDialog promptBehavior) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 127at Microsoft.Open.Azure.AD.CommonLibrary.RMProfileClient.Login(AzureAccount account, AzureEnvironment environment, String tenantId, SecureString password) in X:bt1218881reposrcdevPowerShell.V2CommonLibraryRMProfileClient.cs:line 55at Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD.ProcessRecord() in X:bt1218881reposrcdevPowerShell.V2CommonLibraryConnectAzureAD.cs:line 193at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord : …Message : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADMessage : CertificateNotFoundInStoreHResult : -2146233087CategoryInfo : NotSpecified: (:) [Connect-AzureAD], ArgumentExceptionFullyQualifiedErrorId : System.ArgumentException,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureADException: CertificateNotFoundInStoreStack:

Solution

There could be various reasons why this error is thrown but the components to check is ensure that the certificate used for authentication is uploaded into the Function App via TLS/SSL settings > Private Key Certificates (.pfx) > Upload Certificate:

90

Verify that the thumbprint used in the Connect-AzureAD is correct.

Another reason that this could happen is if you had forgotten to add the Application setting:

WEBSITE_LOAD_CERTIFICATES

The Microsoft documentation can be found here: https://docs.microsoft.com/en-us/azure/app-service/configure-ssl-certificate-in-code#make-the-certificate-accessible

Below is a screenshot of the application setting:

88
88

Upon successfully getting the above configured, the Test/Run should execute successfully with the output below:

87