Fix it now
The user reached the gateway and proved who they were, and was then turned away by policy. The connection authorisation policy decides whether they may use the gateway at all; the resource authorisation policy decides which internal machines they may then reach. The gateway logs the consequence, and Network Policy Server logs the reason.
Get-WinEvent -LogName Microsoft-Windows-TerminalServices-Gateway/Operational -MaxEvents 40 | Format-List TimeCreated, Id, Message
Get-WinEvent -LogName Security -MaxEvents 200 | Where-Object { $_.Id -in 6272,6273,6274 } | Format-List TimeCreated, Id, Message
- Read the gateway entry for the failed attempt. It names the user, the client address and the resource that was requested.
- Find the matching Security entry at the same timestamp. The reason code inside it is the actual decision; the gateway entry is only the outcome.
- In Remote Desktop Gateway Manager, open Policies, Connection Authorization Policies and read the groups on the Requirements tab, then Policies, Resource Authorization Policies and read the computer group the target must be in.
- Have the user retry using the internal fully qualified name of the target rather than a short name or an address. Resource policy matching is done on the name the client supplies.
You are looking for the presence of a denial, but also for the absence of anything at all. A gateway refusal with no matching Security entry anywhere means the request never reached Network Policy Server, which is a different problem with a different fix.
If the user connects, stop here. If they are still refused, or nothing is being logged on either machine, the next section separates the two policies and the RADIUS path between them.
Why it happens
RD Gateway makes two decisions on every connection. The connection authorisation policy answers whether this user may use the gateway: which groups they must be in, whether the client computer must also be a group member, which authentication method is acceptable, and what redirection and timeouts apply. The resource authorisation policy answers a narrower question: which internal machines and ports they may then reach.
The first decision is not made by the gateway service. It is delegated to Network Policy Server, either the local instance or a central NPS server where the CAP store points elsewhere. That is why the reason lands in the Security log rather than in the gateway log, and why Microsoft’s own guidance for authentication failures is to look for the NPS failure events and read the reason code inside them. The resource policy is different: it cannot use a central store and is always processed locally on the gateway.
Resource policy evaluation is name matching against a group of computer objects, so the destination the client asked for has to match a member of that group. A short name, a DNS alias or a raw address will not match, even when the machine is unquestionably the right one. The alternative setting, allowing users to reach any network resource, skips the matching entirely, which is why some deployments never see this failure and others see nothing else.
Microsoft publishes the success side of the gateway log rather than the failure side, and that is more useful than it sounds. Event 200 records that a user met the connection authorisation policy requirements; event 300 records that they met the resource authorisation policy requirements and were granted access; and 6272 in the Security log is the successful logon. Watching for those three to appear is a cleaner test than watching for failures to stop.
The user is in no group referenced by any enabled connection policy
You have this one if A Security failure entry names that user, and none of the groups on the Requirements tab contain them.
- Open Policies, Connection Authorization Policies in Remote Desktop Gateway Manager and read the user groups on the Requirements tab.
- Add the correct group there, or add the user to an existing group in Active Directory Users and Computers.
- Have the user sign out of Windows and back in. Group membership arrives in the Kerberos ticket issued at logon, so until a new one is issued the gateway sees the old membership.
- Confirm what the client now holds with
whoami /groups.
If an account is refused whatever group you put it in, open its Dial-in tab in Active Directory Users and Computers with Advanced Features enabled. Network access permission set to Deny overrides the network policy.
The resource policy does not cover the machine being dialled
You have this one if The connection policy clearly passed, and the failure is logged at the moment the internal resource is requested.
- Open Policies, Resource Authorization Policies and note which computer group the policy uses.
- List its members with
Get-ADGroupMember -Identity RDG-Resources | Select-Object Nameand add the target computer object if it is missing. - Allow for directory replication before retesting.
- Publish the fully qualified name that matches the computer object and have users connect to that, not to an alias or an address.
- Check the ports the policy allows. A policy restricted to 3389 refuses a host listening anywhere else.
Allowing any network resource clears the error immediately and removes the only control over which internal machines a gateway user can reach. It is a diagnostic step, not a fix.
A central NPS server is unreachable or mis-paired
You have this one if The gateway logs the refusal and no matching Security entry appears on either machine.
- In Remote Desktop Gateway Manager, open the server properties and the RD CAP Store tab to see whether the store is local or a central server.
- On the central NPS server, confirm the gateway is present as a RADIUS client with the correct address.
- Re-enter the shared secret at both ends. A secret pasted with a trailing space fails silently.
- Confirm the RADIUS ports are open from the gateway to the NPS server. Microsoft’s troubleshooting guidance names 1812, 1813, 1645 and 1646.
- Restart the Network Policy Server service and retry.
NPS cannot read the account properties it needs
You have this one if Every user is refused regardless of group, including accounts you are certain are correct.
- Open the NPS console on the server holding the CAP store, right-click the top-level NPS node and choose Register server in Active Directory.
- Check the Dial-in tab on an affected account with Advanced Features enabled. Network Access Permission should normally control access through NPS network policy rather than Deny.
- Retry and re-read the Security log; a registration problem produces a uniform refusal that looks like a group problem and is not.
Full reference
Which log to read, and for what
| Where | Entry | What it tells you |
|---|---|---|
| Gateway operational log | Event 200 | The user met the connection authorisation policy requirements |
| Gateway operational log | Event 300 | The user met the resource authorisation policy requirements and was granted access |
| Security log | Event 6272 | A successful logon recorded by Network Policy Server |
| Security log | Events 6273 and 6274 | The failure events; Microsoft directs you here for most authentication failures, and the reason code carries the decision |
The gateway operational log lives at Applications and Services Logs, Microsoft, Windows, TerminalServices-Gateway, Operational. If the CAP store is central, the Security entries are on the NPS server rather than on the gateway, and looking for them in the wrong place is how an afternoon disappears.
The two policies side by side
| Connection authorisation policy | Resource authorisation policy | |
|---|---|---|
| Decides | Whether this user may use the gateway | Which internal machines and ports they may reach |
| Evaluated by | Network Policy Server, local or central | The gateway itself, always locally |
| Can use a central store | Yes | No |
| Matches on | Group membership, client computer membership, authentication method | The name the client supplied, against a computer group |
Configuring a central store without breaking it
- On the gateway, open Server Manager, Tools, Remote Desktop Services, Remote Desktop Gateway Manager.
- Right-click the server node, choose Properties, and open the RD CAP Store tab.
- Select the central server running NPS and enter its address or name.
- Add a shared secret, and make it long. Type it rather than pasting it, or check for a trailing space if you paste.
- On the NPS server, add the gateway as a RADIUS client with the same secret.
- Right-click the top-level NPS node on that server and choose Register server in Active Directory, so it can read the account properties the policy needs.
- Confirm the RADIUS ports are open between the two machines before you test with a real user.
Group membership and Kerberos tickets
This catches people every time. Adding a user to a group in Active Directory does not change what the gateway sees until that user gets a new Kerberos ticket, which happens when they sign out of Windows and back in. Locking and unlocking is not enough. If you add a group and the refusal is identical thirty seconds later, that is the expected result, not evidence that the group was the wrong one. Have the user sign out properly, then check with whoami /groups before you change anything else.
When it works from the office and not from home
Two settings produce that pattern. The connection policy can require the client computer to be a member of a group, which the domain-joined office machine satisfies and the home machine does not. Or it can require an authentication method the home device cannot present. Read the Requirements tab rather than guessing, because the two have different answers: one is a deliberate posture decision and the other is usually an oversight.
None of this involves a licence. The refusal happens at the gateway before any session host is contacted, so no client access licence is consumed and no licence state alters the outcome. Licensing problems in Remote Desktop Services announce themselves as licensing events on the session hosts and say so explicitly.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
Event ID 304 |
Not published by Microsoft. It appears in the gateway operational log against a failed attempt; Microsoft publishes the success counterparts, 200 for the connection policy and 300 for the resource policy | not published by the vendor |
Event ID 305 |
Not published by Microsoft. It appears alongside the same class of authorisation refusal; read the entry’s own text | not published by the vendor |
Event ID 6273 |
Network Policy Server logged a failed logon. The reason code in the body is the real decision | Microsoft Learn |
Event ID 6274 |
The other NPS failure event. Microsoft directs you to 6273 or 6274 for most authentication failures | Microsoft Learn |
Confirm the fix worked
- The affected user reconnects and Event 200 appears in the gateway operational log for that attempt.
- Event 300 follows it, showing the resource policy was met for the machine they asked for.
- Event 6272 appears in the Security log on whichever machine holds the CAP store.
- No new 6273 or 6274 entries are logged for that account at the time of the connection.
- The session is listed in Remote Desktop Gateway Manager under Monitoring against the expected target.
Questions people ask about this
Does fixing this need a licence or extra CALs?
No. The denial happens at the gateway before a session host is contacted, so no client access licence is involved. CAL problems produce their own events and name licensing explicitly.
Why does the same user connect from the office but not from home?
Usually a connection policy that requires client computer group membership, or an authentication method the home device cannot present. The office machine is domain-joined and satisfies the condition.
I added the user to the group and it still fails. Why?
Group membership arrives in the Kerberos ticket issued at logon. Until the user signs out of Windows and back in, the gateway sees the old membership. Check with whoami /groups afterwards.
Can I let people connect by IP address?
Only by setting the resource policy to allow any network resource, which removes the restriction that policy exists to enforce. Publish a name matching the computer object and have people use that.
Can I put the resource policy in the central NPS store too?
No. Microsoft documents that the resource authorisation policy cannot use a central policy and is processed locally on the gateway. Only the connection policy can be centralised.
