How do I add my local ip address so that a firewall rule can be set and I can access my database

Roger Swetnam 0 Reputation points
2025-11-11T14:16:20.7066667+00:00

I am trying to get access to a Sql Data base in Azure from my local machine. When I add my local ip address, I get the following message:

Failed to update server firewall rules for server greyhounds-westus. Error: The client '******@NETORGFT.....onmicrosoft.com' with object id 'xxxxx' does not have authorization to perform action 'Microsoft.Sql/servers/firewallRules/write' over scope '/subscriptions/1fa5dcd8-28d0-4a87-847d-db50adadfa98/resourceGroups/GreyhoundsWestUS/providers/Microsoft.Sql/servers/greyhounds-westus/firewallRules/ClientIPAddress_2025-11-11_8-56-22' or the scope is invalid. If access was recently granted, please refresh your credentials.

I have in fact Global Administrator and Sql Database Contributor roles. How do I get this to work?

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2025-11-11T14:16:44.41+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To add your local IP address to the Azure SQL Database firewall rules, follow these steps:

    1. Check Your Permissions: Ensure that your account has the necessary permissions to modify firewall rules. You mentioned having Global Administrator and SQL Database Contributor roles, which should typically allow you to perform this action. If you're still encountering issues, it might be worth checking if there are any additional permissions required or if your role has been correctly assigned.
    2. Add Your IP Address: You can add your local IP address by using the Azure portal:
      • Navigate to your SQL server in the Azure portal.
      • Go to the Firewalls and virtual networks settings.
      • Click on Add client IP to automatically add your current IP address.
      • Alternatively, you can manually enter your IP address and save the changes.
    3. Refresh Credentials: If you have recently been granted permissions, try refreshing your credentials or logging out and back into the Azure portal to ensure that your permissions are recognized.
    4. Wait for Changes to Take Effect: After adding your IP address, it may take a few minutes for the changes to propagate. If you still cannot access the database after a few minutes, double-check the firewall settings.
    5. Check for Dynamic IP Issues: If your local machine uses a dynamic IP address, ensure that you are adding the correct IP address each time you connect. You may want to consider using a static IP address if this is a recurring issue.

    If you continue to face issues, consider contacting Azure support for further assistance.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.