会社の方針で、Microsoft365のアカウントに多要素認証が設定され、2段階認証を突破しないとログインできなくなってしまいました。
UnattendedロボットでMicrosoft365アクティビティを使用しており、これまでは「ユーザー名とパスワード」の認証の種類を用いてメール送付していたのですが、上記設定のせいで送信できなくなってしまいました。
2段階認証がついているアカウントでメールを送信するにはどのようにすればよろしいでしょうか。
Switching from basic username/password authentication to OAuth2 (with certificate‑based or token‑based authentication) is generally recommended for secure, unattended operations. This involves configuring an Azure AD application and granting the appropriate permissions (often using the Microsoft Graph API) so that your robot can authenticate without interactive intervention.