Can't add IP address to storage account

New Contributor

I can no longer add an IP address to a storage account networking using the portal. This started within the last week.

I get the message "Invalid argument: 'The prefix must be between 0 and 30.'." I've tried a valid IP address and CIDR notation. ( or

Is this a problem with the Azure portal?

20 Replies
We're experiencing the same issue as of today. Was working last week. Is there a fix for this?
Experiencing this issue as well



Also have exactly the same problem - can add it as a /30, but that's clearly no use.

I experienced the same problem but i found a workaround by creating a network rule via the Azure CLI. You can find the instructions here: I guess PowerShell should also work, so it must be a bug in the portal.


I just raised a support request at Microsoft to solve the problem in the portal.

From Azure Portal- Navigate to Storage account which you want to allow Secure network connection..
1) Go to the storage account you want to secure.
2) Select on the settings menu called Networking.
3) Check that you've selected to allow access from Selected networks.

To grant access to an internet IP range, enter the IP address or address range (in CIDR format) under Firewall > Address Range.
To remove an IP network rule, select the trash can icon next to the address range.
Select Save to apply your changes.

Note: You must provide allowed internet address ranges using CIDR notation in the form or as individual IP addresses like
Small address ranges using "/31" or "/32" prefix sizes are not supported. These ranges should be configured using individual IP address rules.
I know how to add the IP address. I get the following error with valid IP addresses and CIDR notations.

"Invalid argument: 'The prefix must be between 0 and 30.'."

Experiencing the same issue. Unable to add a single IP address

Please are you adding Internal IP or External IP range in firewall address?

@Seshadrrmy own single external IP address. The IP address is a valid external IP address.

When adding it in the Networking > Firewall for the storage account I receive the following error message.

The IP address is a single, valid external IPV4 address.Screenshot 2021-03-31 at 14.38.51.png

I need to add a single IP address. I've tried, and get the same error. The field validation should allow individual IP addresses or CIDR prefixes between 0 and 32.

It also did used to allowing single IP addresses, as I have many storage accounts, each with a couple of single external IPV4 IP addresses in the firewall.

Screenshot 2021-03-31 at 14.48.40.png

Try to use with CIDR notation with a small range, Usually, when you access the storage explorer on your own browser it will automatically pick up the client IP address where you can add with a single range, however for the definite manual range try to use CIDR notation. I have been tested with the same IP which i have received from ISP with CIDR which results in the success
CIDR notation using /31 and /32 will not work.
A small CIDR range is unacceptable as /30 results in 4 IP addresses having access.

Picking up my own client IP is fine, but this doesn't work when I need to add other single IP addresses for those without access to the Azure portal.
I tested with CIDR /30 which has a minimum host address which works for me.
Yes, through Portal the argument error in which is accepting from o to 30 CIDR, whereas by CLI it accepts with your own IP

az storage account network-rule add --resource-group "myresourcegroup" --account-name "mystorageaccount" --ip-address ""

Just writing to confirm getting same behavior in the portal today as I was looking for a solution same as everyone else. @Tom-S-2060 

Microsoft has confirmed that there is a problem in the portal and they are working on a solution. In the mean time it is only possible to add a single IP address through the cloudshell (Powershell or Azure CLI can also be used).

I will post an update when Microsoft confirmed the issue is solved.
The problem seems to be solved: this morning I could add an IP address again.