Cannot configure mail server settings

Cannot configure mail server settings

Hi,
We are not able to configure the mail server settings. We have followed the below steps
1. Created a new user in outlook.office365.com.
3. Created APP specific password.
4. Configured below mail server settings in SDP

Incoming:
Server name: outlook.office365.com
Port: 993
Username and APP specific password.

Outgoing:
Server name: smtp.office365.com
Port: 587

Error: 
Failure:Email settings saved. But error occurred while trying to check connection with mail server - Authentication Failed:[AUTHENTICATE failed.] 

###################################################################################

                New to ADManager Plus?

                  New to ADSelfService Plus?