I believe you should be able to use the Authentication=ActiveDirectoryInteractive in your connection string to get it working locally, but this won’t really work for an unattended scenario where you cannot handle the interactive MFA part.
For unattended scenarios, please have a look at the Active Directory Service Principal.
I found some more info over here: