Detailed guide to set up OneDrive Personal with 2FA

I have not used 2FA for OneDrive, but generally, Duplicati requires a continous access option (it will not ask you for a 2FA code each time it runs a backup).

For the other connections based on OAuth, you only need to provide the 2FA access code when setting up the integration (i.e. getting the AuthToken from https://duplicati-oauth-handler.appspot.com/). After this, a separate set of login credentials are created for Duplicati to use (encrypted on the server with the AuthToken). These credentials are assumed (by the OAuth design) to be more secure than your normal login, and thus do not require a 2FA code to be used.