Cannot sign-in to iCloud account on Outlook with app password
I'm trying to sign in to my iCloud email account on Outlook for Mac (version 16.67) on my 2020 13-inch M1 MacBook Pro (Ventura 13.0.1).
I have 2FA enabled on my iCloud account, so I have to sign in by generating app-specific passwords via my Apple ID. Every time I enter the app password I see an error message saying:
Unable to sign in. Try again or create an app password for this account.
I am copying and pasting the app password and ticking the 'show password' tickbox to check that it is correct. I have used the same process of generating an app password to sign into Outlook on my iPhone and it works. I have also tried signing in on Outlook for Mac using my actual Apple ID password, but I get the same message.
Does anyone know how I can resolve this?
MacBook Pro 13″, macOS 13.0