What could be the possible solution if you encounter the error "Move IMAP Mail Message: Authentication failed because the remote party has closed the transport stream"?
Issue Description:
If you encounter the error, "Authentication failed because the remote party has closed the transport stream," it is tied to the issue of Security Protocol Type. This usually appears when the default security protocol type of an application is too low. While Microsoft deprecated TLS 1.0 and TLS 1.1 in 2020 and Basic Auth in Exchange Online, O356 activities with Graph API are recommended to maintain security and efficiency. The deprecation may disrupt any O365 processes depending on these protocols.
Error Message Example:
Move IMAP Mail Message: Authentication failed because the remote party has closed the transport stream,Get IMAP Mail Messages: Authentication failed because the remote party has closed the transport stream.
Resolution:
Step 1: Update the UiPath.Mail.Activities package to the latest version.
Step 2: Validate and enable TLS 1.2 while disabling TLS 1.0 and TLS 1.1 in the registry settings. Assistance from the IT department is recommended. Follow these steps in the registry settings:
- Open 'regedit', and navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols
- Create new Keys for 'TLS 1.0,' 'TLS 1.1,' and 'TLS 1.2'.
- Produce 'client' and 'server' keys inside each protocol.
- To disable TLS 1.0 and TLS 1.1, go to 'Client & Server' keys for each protocol, and create two DWORDs:
DisabledByDefault - Set value to Hexadecimal 0.
Enabled - Set value to Hexadecimal 0.
- To enable the TLS 1.2 protocol, go to 'Client & Server' keys and create two DWORDs:
DisabledByDefault - Set value to Hexadecimal 0.
Enabled - Set value to Hexadecimal 1.
Step 3: After the changes, restart the Robot machine and validate the modifications.
By following the above steps, your security protocols will be updated to avoid the authentication error, thus enhancing the integrity of your security specs.