Cannot create Inbound Security Rule in NSG

IT 110 0 Reputation points
2025-10-12T16:15:19.5866667+00:00

I cannot add an inbound security rule to allow RDP in my Network security group. It's a simple rule from any source to any destination for RDP's TCP port 3389. I've tried multiple times. The error is:

"Failed to update security rule 'AllowRDP'. Error: There was an error processing your request. Try again in a few moments." I have tried for a couple days at different times of day. I even started over creating a new server VM first.

When I try to create the rule using Azure CLI instead of the portal, it can't find the resource group. But the group definitely exists in the portal. I checked to make sure the right subscription ID was being used.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
{count} votes

1 answer

Sort by: Most helpful
  1. Harish Peddapally 1,670 Reputation points Microsoft External Staff Moderator
    2025-10-22T02:55:56.1333333+00:00

    Hi IT 110,

    Good day, i hope you are doing great!
    Welcome to Microsoft Q&A and Thanks for engaging in this discussion and providing detailed follow-up. Let’s summarize this thread with the key findings, root cause, and the steps to resolve your issue regarding creating an inbound RDP rule in your Network Security Group (NSG).

    Summary of the Issue:

    As You mentioned that you:

    • Created Azure Entra Domain Services (Entra DS) using default settings.

    Deployed a Windows Server 2019 VM in the same environment.

    Tried adding an inbound RDP rule (TCP port 3389) to allow remote desktop access.

    Encountered the following error, both via Portal and CLI:

    “Failed to create security rule 'AllowRDP'. Error: There was an error processing your request. Try again in a few moments.” Azure CLI: “Operation returned an invalid status 'Bad Request'.”

    You also confirmed:

    • Both VM and NSG are in East US region.

    Only default rules exist; no apparent conflicts.

    Subnet is properly associated.

    You are currently using the Azure Free tier, which limits Bastion usage and certain actions like deleting managed NSGs.

    Root Cause:

    The aadds-nsg (Network Security Group created with Azure Entra Domain Services) is automatically managed and locked by Azure. This NSG is provided as part of the managed domain deployment to secure domain resources, and it cannot be modified manually—including adding custom inbound rules like RDP.

    This design prevents accidental exposure of the domain controllers or weakening of domain-level security. Hence, the “Bad request” error occurs when you attempt to modify it through the portal or CLI.

    For reference:

    Network security for Azure Entra Domain Services

    Network Security Groups overview

    Recommended Solution:

    To enable RDP access to your custom Server 2019 VM, you’ll need to deploy it outside the managed Entra DS VNet:

    Create a new Virtual Network (VNet) separately from the Entra DS VNet.

    Create a new NSG within that VNet and configure your inbound RDP rule (TCP 3389) as needed.

    Deploy the new VM within this custom VNet and associate the NSG with either the subnet or VM NIC.

    If you still need the VM to communicate with Entra DS for authentication or joining the domain, peer the two VNets (your custom VNet ↔ Entra DS-managed VNet).

    This ensures secure, domain-aware communication while retaining full control of NSG rules.

    If you prefer not to expose RDP on port 3389, another option (once your subscription allows) is to use Azure Bastion for TLS-based VM access.

    Additional References:

    Manage network security groups

    Diagnose network traffic filtering problems

    Azure subscription service limits including NSG rules

    This behavior is by design, and creating your own VNet/NSG combination is the correct and supported approach. Feel free to reply if you have any further questions or need guidance on VNets and peering setup.

    If the information resolved your issue, kindly consider accepting the answer — it will help others who might be facing similar challenges.

    Thanks,

    Harish

    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.