SSMS 17.1 Add New Firewall Rule Error Code 401: Add IP when logging into Azure DB for the first time.
The title says it all.
New SSMS install on new PC, to new DB on new Azure SQL Server.� Prompted to Log in to Azure, OK.
'New Firewall Rule' dialog Prompts to add firewall rule to Azure, OK. Click OK and get error
"An error occurred while creating a new firewall rults (HTTP Status Code 401)) (ConnectionDlg)"
Sorry folks, but we are not able to repro this issue (either using SSMS 17.9.1 or SSMS 18 Preview 7).
Since multiple people out there are reporting this issue, it is obvious that we are missing something that is specific to your environment or configuration.
Could you help us out and try to describe a little better your subscription/environment/account/permissions?
For example, does the following mainstream scenario works for you all:
1) Connect to Azure Portal
2) Create SQL server+database
3) Go to SSMS and connect to
4) Add firewall rule
If it does, then can you identify what is different between the case where it works and the case where it does not?
I still have the issue with v18
you'll need two azure subscriptions
one that is your default one in azure portal
2nd one that contains the SQL server and DB
Jay Hayman commented
Just 1+ this as I'm having the same issue with 17.9.1 and the previous release. This used to work and certainly worked first time I used it but since that initial action, it;s never worked again. Manually adding my IP to the firewall via the Portal works fine,
@Matteo the portal works just fine, as does SSMS on another machine. Reinstalling Windows and SSMS fixes the issue as well. So this is computer specific. Possibly a corruption of some cached info, although clearing IE cache didn't help. Maybe you're storing an expired token of some kind?
Still not fixed in 17.9.1
Please try with latest GA - 17.9.1 or 18 Preview 6 and post back if you still see the issue.
v 18 Preview 4 still has bug
Remeez Persent commented
17.8.1 still an issue.
Daniel Rusznyak commented
17.6, this is still an issue...
There is an issue with the error message not detailing the error returned from Azure.
One possible error is that the Microsoft Account signed in on SSMS does not have permission to add a new IP to the firewall exception list.
Try signing in as the owner of the subscription