Set OAuth2 authentication declaratively for Thunderbird with home-manager

Hello everyone,

I’m trying to set up my school email which is managed by Microsoft through home-manager’s accounts.email.accounts. How can I set the authentication method there? Microsoft requires OAuth2, I think.