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