ASSOCIATE PUBLIC IP TO APPLICATION GATEWAY

José Diego Ávila Ruiz 20 Reputation points
2025-06-26T01:09:42.48+00:00

I'm having the same issue. Want to put an AG in front of a VM and reuse the existing IP of the VM. So I disassociate the Public IP from the VM and then start making a new AG. In the wizard on the page 2 (Frontends) I try to pick the dissociated IP but it is in the "Cannot be associated with this application gateway" list. Selecting it gives the error message "This Public IP cannot be associated with this gateway <br/>".

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
{count} votes

Accepted answer
  1. G Sree Vidya 4,005 Reputation points Microsoft External Staff Moderator
    2025-06-26T01:35:49.21+00:00

    Hi José Diego Ávila Ruiz

    We understand that you were trying to associate a public IP address with your Azure Application Gateway after disassociating it from a VM. The error message you're seeing ("This Public IP cannot be associated with this gateway") typically happens due to IP constrains:

    When you disassociate a Public IP from a VM NIC, Azure still considers that IP as "in use" or not eligible for Application Gateway if:

    • The IP is not Standard SKU (AG requires Standard SKU).
    • The IP is not in the same region or resource group as the AG.
    • The IP is still linked to a resource in the background (e.g., NIC, DNS label).
    • The IP was created as Dynamic, not Static.

    Here’s what you need to check:

    1. Check the Public IP SKU
    • Go to the Public IP resource in Azure Portal.
    • Ensure it is Standard SKU and Static.
    • If it's Basic, you cannot use it with Application Gateway.
    • You’ll need to create a new Standard SKU Static IP.
    1. Ensure It’s Fully Disassociated
    • Go to the VM’s NIC and confirm the IP is fully removed.
    • Also check:
    • No DNS label is set; No Load Balancer or NAT Gateway is using it.
    1. Same Region and Resource Group
    • The Public IP must be in the same region and preferably the same resource group as the AG.
    • Public IP SKU: Ensure that the public IP you’re trying to associate is of the correct SKU.
    • The Application Gateway V2 supports only standard SKU public IPs. If your disassociated VM's public IP was standard, you’d be fine; however, if it was a basic dynamic IP or not in the right SKU, it won't work.
    • The public IP must not be associated with any other resource at the time of trying to attach it to the Application Gateway. Make sure it's entirely disassociated from any other services.
    • You can only associate a certain number of frontend IPs with each Application Gateway. Ensure you haven't hit the limits in your configuration.

    Additionally we have suggested you create the support ticket for the IP issue as you need to use the old IP.

    Please submit a support ticket for further investigation and share the SR# with us.

    https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

    User's image


    I hope this helps! If these answers your query, do click the "Upvote" and click "Accept the answer" of which might be beneficial to other community members reading this thread.


0 additional answers

Sort by: Most helpful

Your answer

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