How to create an app password for applications that don't support two-step verification
- Click on this link https://account.activedirectory.windowsazure.com/AppPasswords.aspx
- If prompted, log in with your Microsoft 365 credentials (you may also need to authenticate using your alternate method such as SMS)
- Click on Create
- Give it a name and click next
- Lastly, copy new password to clipboard and use this in your app with your 365 username.