You are receiving the following error message because your IP address (client or local) has not been added to the Azure firewall on the Azure SQL Server.
Error: mssql An error occurred while creating a new firewall rule Value cannot be null. (Parameter serverName)
If you want to grant access to your local or client IP, then follow the below steps:
Go to Azure portal
Select “SQL Servers” from Azure Services.
Fig 1. Azure Services — SQL servers
Select your SQL Server from the list to which you want to add the network firewall settings.
Fig 2. Azure SQL servers
Select “Networking” from the left-side menu.
Under the firewall rules, enter the rule name and the start and end IP addresses of your client or local machine.
Fig 3. Azure SQL server — Networking
Save the changes.
Note:
Your client IP address will change frequently unless you’re using a static IP address.
Try to connect the SQL server from your client, and it should be able to successfully connect the SQL server and access the database.