Auth abruptly started failing for COM library but not for Client
I am using the following code to connect to our SFTP server.
Up until a few hours ago this was working.
I can connect via the same user/password via the WinSCP client (Full Install), but not via the COM library (WinSCP-6.5.4-Automation.zip).
I receive the following error:
Is there any known issue, or have they simply blocked the call from the library?
I can post redacted logs if necessary.
Thank you
Up until a few hours ago this was working.
I can connect via the same user/password via the WinSCP client (Full Install), but not via the COM library (WinSCP-6.5.4-Automation.zip).
I receive the following error:
I have verified my credentials and that this is the only WinSCPnet.dll available to the PowerShell 5.x script.<path>\install.ps1 : Exception calling "Open" with "1" argument(s): "Authentication failed.
Authentication log (see session log for details):
Using username "j****d@*****.com".
Access denied.
Authentication failed."
Is there any known issue, or have they simply blocked the call from the library?
I can post redacted logs if necessary.
Thank you
Add-Type -Path "<path>\WinSCP-6.5.4-Automation\WinSCPnet.dll" $credential = $null if ($host -and $host.UI -and $host.UI.PromptForCredential) { $credential = $host.UI.PromptForCredential( $Config.LoginTitle, $Config.LoginPrompt, "", "MyCompany-SFTP" ) } if (-not $credential) { throw "Credentials not provided." } $session = New-Object WinSCP.Session $session.DebugLogPath = $Config.DebugLogPath $session.DebugLogLevel = $Config.DebugLogLevel $session.add_FileTransferProgress( { Show-FileTransferProgress($_) } ) $session.Open( (New-Object WinSCP.SessionOptions -Property @{ Protocol = [WinSCP.Protocol]::Sftp HostName = $Config.HostName UserName = $credential.UserName SecurePassword = $credential.Password # Password: A SecureString containing the password. SshHostKeyFingerprint = $Config.HostKeyFingerprint }) )