I am unable to save the Email Account Settings in ERP Next 14 while configuring Office 365

I am unable to save the Email Account Settings in ERP Next 14 while configuring Office 365
While saving it says request time out.
Please help…
I am using ERP Next v14.29.2 (version-14)

Here is the screenshot of the same below

How much time it takes to pop up this erro message?

2 mins approx

check logs inside erpnext installation directory, /var/log/syslog and /var/log/nginx/error.log.

Check latest updated logs from above log files. It may give some hints about the error.

Is external/internal firewall is active?

I cant see any kind of errors.
Secondly I have disabled the firewall settings as well.

Can anybody help me with this…