Can't connect to Office365 smtp outgoing server

I receive message for my work account, but cannot send any as the settings give me an error message (see attached). Please help.

Settings are as follows

Solved - used normal password instead of OAuth2 for the outgoing smtp and works.