Fix it now
Event 5313 is Group Policy recording a decision, not a failure: it lists the policy objects it deliberately set aside this cycle and why. Nothing is broken in SYSVOL, replication or the network. Something told the service not to apply the policy you expected, and the entry names what.
gpupdate /force
gpresult /r /scope:computer
- In Event Viewer, open the Group Policy operational log and find the newest 5313. It lists each excluded policy object with the reason for its exclusion. Read the reason before changing anything.
- Read the 5312 just before it as well. That is the list of policy objects that did apply, so the two together account for everything that was in scope.
- For a security exclusion, open the policy object’s delegation and confirm the principal you scoped it to still holds both read and apply permissions, and that the computer account can read it too.
- For a filter exclusion, run the filter’s query on the client itself with
Get-CimInstance -Query "<the query>". Microsoft states the filter is evaluated on the destination computer and the policy applies only if it evaluates to true.
Microsoft does not publish these event IDs, so do not search for them expecting a definition. The entry’s own text is the documentation.
If the policy moves into the 5312 list and its settings take effect, you are done. If not, the next section covers the three tests a policy object has to pass.
Why it happens
A policy object applies only if several separate tests pass. It has to be linked above the object with the link enabled. The security principal has to be permitted both to read it and to have it applied. And if a filter is attached, the query has to succeed when evaluated on that client. Fail any one and the object lands in the exclusion list rather than in the applied list.
Microsoft’s own description of security filtering is deliberately narrow: it refines which users and computers receive and apply the policy settings in a policy object, it determines whether the object applies to groups, users or computers, and it cannot be used selectively on different settings within one object. That last clause matters. Filtering is all-or-nothing per policy object, so scoping half a policy object to one group is not something filtering can express.
The filter half is different in kind and Microsoft is explicit about it: the filter is evaluated on the destination computer during the processing of Group Policy, and the policy object applies only if the filter evaluates to true. A filter is not a static label attached to a machine. It is a query that has to succeed on every cycle, on that machine, against that machine’s own management repository. If the query cannot be answered at all, the object is excluded, and the exclusion looks identical to a deliberate one.
None of the four event IDs in this family – 5313, 5312, 7017 and 4017 – is published by Microsoft, so treat the numbers as labels for where you are in the cycle rather than as definitions. What is documented, and what you should act on, is how filtering itself works.
Read access was removed along with apply
You have this one if The exclusion reason is security, the policy object targets a group, and its delegation shows only that group plus administrative entries.
- Open the policy object’s delegation and check who can read it, separately from who it applies to. Those are two different permissions and scoping usually only means to change the second.
- Restore broad read access – Authenticated Users, or Domain Computers if your standard forbids the former – without granting apply. The scoping you intended still holds.
- Run
gpupdate /forceand confirm the object moves from the exclusion list to the applied list.
Audit the rest of your scoped policy objects at the same time. If one was scoped this way, others almost certainly were, and they will surface one at a time over months.
A deny is beating the allow you set
You have this one if The principal has both permissions and the object is still excluded on security grounds. An exclusion group is usually involved.
- Look at the advanced permissions on the policy object for an explicit deny. A deny beats an allow however many groups grant it.
- Check the real token on the client rather than the group memberships you expect, because nested groups are usually why a deny applies unexpectedly.
- Remove the principal from the exclusion group, or drop the deny and scope with allows only.
- Sign out and back in before retesting, since group changes do not affect a token that has already been issued.
The filter query returns nothing on this client
You have this one if The exclusion reason is the filter, and the same policy object applies correctly to other machines.
- Copy the query out of the filter and run it on the affected client with
Get-CimInstance -Query "<the query>". - If it returns nothing, the filter is excluding this machine correctly and the query is what needs changing.
- Check the assumptions in it. Queries written against a version string stop matching when a new build ships, and product-type conditions separate a workstation from a domain controller and a member server.
- Consider whether a container and a security group would express the same intent, since Microsoft notes the filter runs on every client on every cycle.
The management repository on the client cannot answer at all
You have this one if Every filtered policy object is excluded on one machine, and running a simple query by hand fails or hangs.
- Test the repository’s consistency before doing anything destructive to it.
- Restart the management service and retry a simple query.
- Salvage rather than reset. Rebuilding the repository from scratch loses classes that third-party agents registered, and those agents will not necessarily notice.
- Re-run
gpupdate /forceand confirm the filtered objects move into the applied list.
The half of the policy object you edited is disabled
You have this one if The entry says the object was skipped as empty or not applicable, and the settings are definitely there in the editor.
- Check the object’s status in the management console. The computer half, the user half or both can be disabled independently of the settings inside.
- Set it back to enabled for the half you need, and confirm the link itself is enabled on the container.
- Run
gpupdate /forceand re-read the operational log.
Full reference
The events in this family
| Event | Status | How to read it |
|---|---|---|
| 5313 | Not published | The list of policy objects excluded this cycle, each with a reason. The reason is the diagnosis |
| 5312 | Not published | The companion list of objects that were applied. Read it with 5313 to account for everything in scope |
| 7017 | Not published | An error from the directory phase that precedes filtering. Read the entry rather than the number |
| 4017 | Not published | The start entry for that same phase, useful for timing |
Because Microsoft publishes none of these, searching for the event ID produces answer sites rather than documentation. The entry itself names the policy object and the reason, and that is the reliable information.
The three tests, in the order they are applied
- Is the policy object linked above this user or computer, with the link enabled?
- Is the principal permitted to read it and to have it applied? Microsoft describes security filtering as refining which users and computers receive and apply the settings, and notes it cannot be applied selectively to individual settings within an object.
- If a filter is attached, does the query evaluate to true on this client? Microsoft states it is evaluated on the destination computer during processing, and the object applies only if it is true.
Filters have a running cost
Because a filter is evaluated on every client on every cycle, an expensive query is a cost you pay continuously across the whole estate rather than once when you write it. It is also the exclusion that is hardest to see: a policy object excluded on security grounds points at a permissions change somebody made, while a policy object excluded by a filter points at a query that stopped matching, possibly because of a build that shipped last month. Where a container and a security group express the same intent, they are cheaper and they fail more visibly.
5313 is not an error
A healthy, well-scoped estate produces exclusion entries on every cycle, on every machine. That is what scoping looks like from the inside. The event only means something when a policy object you expected is on the list, and then it means the service did exactly what it was told. The work is finding out who told it, which is a delegation question or a query question and almost never an infrastructure one.
Where the reporting tools and the log disagree
- A results report evaluates afresh at the moment you run it, in the context you run it in. The log records what happened during the actual cycle, including background cycles nobody was present for.
- A report generated as an administrator can show a policy object applying that does not apply to an ordinary user, because the token is different.
- A report shows scope and content. It does not re-run client-side extensions, so it cannot tell you whether the settings inside actually took effect.
- When the two disagree, the log is describing the machine and the report is describing a simulation. Trust the log.
Before you change a delegation
Write down what the scoping is supposed to achieve before you touch it, because most of these tickets end with someone widening a policy object until the symptom disappears. The intent is usually “this applies to these machines and not those”, and that intent survives restoring read access to everything while keeping apply scoped to the target group. If you find yourself granting apply to Authenticated Users to make an error go away, you have changed what the policy object does rather than fixed why it was excluded.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
Event ID 5313 |
Lists the policy objects deliberately excluded this cycle, each with the reason for its exclusion. Not published by the vendor, so read the entry rather than the number | not published by the vendor |
Event ID 5312 |
The companion list of policy objects that passed filtering and were applied. Not published by the vendor | not published by the vendor |
Event ID 7017 |
An error entry from the directory phase that runs before filtering. Not published by the vendor; read the entry for the operation and status it carries | not published by the vendor |
Event ID 4017 |
The start entry for that same directory phase, useful for timing the work before filtering. Not published by the vendor | not published by the vendor |
Confirm the fix worked
- The policy object appears in the applied list rather than the exclusion list on the next cycle.
- A results report lists it as applied for the right half, computer or user.
- The settings it carries have actually taken effect on the machine.
- A second client under the same link gets the same result, so the fix was in the policy object and not in one machine.
- No other policy object has moved into the exclusion list as a side effect of the permission change.
Questions people ask about this
Is 5313 an error?
No. It is a record of a decision, and a healthy client with well-scoped policy produces these entries on every cycle. It only matters when a policy object you expected is on the list.
Microsoft does not document these event IDs. What should I rely on?
The entry’s own text, which names each excluded policy object and the reason. What Microsoft does document is how filtering works: security filtering decides whether an object applies to groups, users or computers, and a filter query is evaluated on the client with the object applying only if it is true.
Should I use filters or security groups?
Containers and security groups wherever they express the intent. Microsoft notes the filter is evaluated on the destination computer during processing on each cycle, so the cost is continuous and the failure mode is quieter.
Why does a results report disagree with the log?
Because the report evaluates afresh at the moment you run it, in the context you run it in, while the log records what happened during the real cycle. When they disagree, the log is describing the machine.
Do I need to buy anything?
No. This is permissions and query logic inside Active Directory, and every tool involved ships with Windows or the remote administration tools.
