Some times the issue will raise regarding tokens.
Check the following steps:
- Create Azure Postgres Server on azure platform
a. Create a resource group on your name
b. Create Postgres server like mentioned below

Here, for testing purposed, created one single server
c. Create the administrative settings like server name and password

Make a note of the server name, admin username and password.
d. By default we can keep the database name as "postgres"
Go to PGAdmin -> right click on the server
Choose the connection option
Mention all the credentials which you used to create a DB.
To test whether the credentials are working or not. Create a JUMP server on azure platform and use PGAdmin on that. Once it is working there, it will connect your database to azure from local.