Hello @Rafael Miranda
Based on the issue shared The "couldn't connect to the gateway" error in Azure Virtual Desktop (AVD) host pools often due to from session host agent issues, network blocks to gateway URLs, or insufficient user permissions like missing Virtual Machine User Login role.
This prevents connections to sessions, showing host pools as non-functional. - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-desktop/troubleshoot-vm-configuration
Common cause based on the issue as you have added:
- RDAgentBootLoader or Remote Desktop Agent Loader stopped please check Event Viewer (Application log) for ID 3703 ("RD Gateway Url: is not accessible").
- Firewall/proxy blocks required AVD gateway URLs (e.g., *.wvd.microsoft.com) so here unblock TCP 443 outbound.
- It lacks "Virtual Machine User Login" role on VMs/resource group or not assigned to host pool application group; for Entra-joined VMs, add targetisaadjoined:i:1 RDP property.
- Expired token or agent not registered (IsRegistered=0 in registry) so, session hosts show "Unavailable".
We can suggest:
- Please Verify NSG/Firewall allows AVD URLs and run Required URL Check tool.
- Restart RDAgentBootLoader service and generate new registration key if needed.
- Assign RBAC roles via Azure portal - Virtual Machine User Login at resource group scope.
- Check host pool session hosts status and remove or re-add if stuck.
Microsoft Documentation:
- Troubleshoot AVD Agent Issues – Here it covers gateway errors (3703), registration, services.
- Troubleshoot Session Host VMs – Agent installs, domain join, security errors.
- AVD Network Requirements.