Getting "SMTP invalid credential’s" Error for Email Account on self-hosted Frappe

Hey anyone can help me with this.? I’ve setup the frappe on AWS EC2, added business email domain in Email Domain List and created Email account linked with Administrator and Connected User with Authentication using OAuth connected to app registered on Microsoft Entra ID. Connected user for email also successfully able to Authorize API Access. Checked the checkbox for email in Both user and Email account doctype in role permission manager. By using connected user credentials trying to send the mails using New Email on bottom of email account created but it’s failing, with status “Error” although in Administrator communication all mails are receiving. Getting this error.

File “/home/ubuntu/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/”, line 143, in send ctx.smtp_server.session.sendmail( File “/home/ubuntu/frappe-bench/apps/frappe/frappe/email/”, line 94, in session self.throw_invalid_credentials_exception() File “/home/ubuntu/frappe-bench/apps/frappe/frappe/email/”, line 116, in throw_invalid_credentials_exception frappe.throw( File “/home/ubuntu/frappe-bench/apps/frappe/frappe/”, line 536, in throw msgprint( File “/home/ubuntu/frappe-bench/apps/frappe/frappe/”, line 504, in msgprint _raise_exception() File “/home/ubuntu/frappe-
bench/apps/frappe/frappe/”, line 450, in _raise_exception raise raise_exception(msg)