When an Azure Active Directory (AAD) user enables Multi-Factor Authentication (MFA), the only option to authenticate programs is using "app passwords."
Is it possible to access Microsoft Graph using an App Password? Basic Auth has been generally deprecated, but perhaps there is a way?