Hi Khaula Al Kindi,
Thanks for reaching out Microsoft Q&A!
Connection from Azure Services: If you're connecting from an Azure service, ensure that you have the option "Allow access to Azure services" enabled.
Firewall Rules: Ensure your client’s IP address is allowed to access the PostgreSQL server. Check your firewall rules in the Azure portal to make sure your current IP address has been added correctly.
Can you please share what error message you are getting while try to connect to the server?