Hi Hassan:
Thanks for reaching out to Microsoft Q&A.
Please perform the following steps sequentially to see if it works for you
- Check if the ssl connection under server parameters has been set to non mandatory for postgres services in azure
- Restart the server
- In azure portal set the require_secure_transport from server parameters to OFF
- Add firewall rule 0.0.0.0 - 255.255.255.255 --(Obviously not the best solution but you can take this into consideration only if nothing worked and you want to get through this anyhow)
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.