About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
A user cannot sign in to a domain, or cannot connect to a network share on a server, and Windows returns error code 1384. Microsoft documents the text as: During a logon attempt, the user's security context accumulated too many security IDs.
Other users sign in fine, so the fault is in this one user's group memberships. Microsoft describes the behaviour as by design and gives no setting that raises the limit. Microsoft's page does not give a fix. The way out suggested here is a smaller token, reasoned from the stated cause, and the steps below count first and change group membership last, with a saved list so it can be put back.
What the error means
Windows builds a security access token for each user. The token lists the user's security identifiers (SIDs): the user's own and one for each group the user belongs to. Microsoft's page says: "Windows systems contain a limit that prevents a user's security access token from containing more than 1,000 security identifiers (SIDs)." When the user is validated for access to set up a new session with a server, the user "must not be a member of more than 1,000 groups in that server's domain". If the limit is exceeded, "access to the server is denied, and the error code 1384 is returned to the user."
The page then explains how groups are counted, and this is where counts go wrong:
- If the server is in a second domain, the total is the user's group membership in that second domain added to the user's global group membership in their own domain.
- A group of the user's domain that is a member of other groups in the second domain adds more than one. Microsoft's example: "if you add a user to a global group in their domain, and add this global group to four local groups in a second domain, the user's total group membership (and SID count) in that second domain is increased by five, instead of just being increased by one as you may expect."
Microsoft's separate page on Kerberos and many groups describes the token it covers as including the SIDs of the user, the SIDs of all of the groups the user belongs to and any SIDs stored in the account's sIDHistory attribute.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| The user is a member of a very large number of groups | Error 1384 for one user at sign-in or when connecting to a share | A count of the user's groups, including nested and second-domain groups |
| Nested groups multiply the count | The user's direct membership looks small | A count that follows the nesting, as in Microsoft's example above |
| The server is in another domain and adds its own groups | The user signs in to their own domain but fails on the server in the resource domain | The failure is specific to that server's domain |
SIDs stored in sIDHistory |
The Kerberos page counts these SIDs in the token | The account has values in sIDHistory |
Prove the cause before changing anything
All of these only read.
- Confirm the error and who it affects. Note the user, the server or domain they connect to, and the time. Microsoft's page says the error occurs when you "log on to a domain or connect to a network share on a server".
- List the groups the user is a member of directly. Microsoft's page for
Get-ADPrincipalGroupMembershipsays it "gets the Active Directory groups that have a specified user, computer, group, or service account as a member" and that it requires a global catalog:
Get-ADPrincipalGroupMembership -Identity <UserName>
Replace <UserName> with the account's SAM account name. The page does not say that the result includes nested groups, and Microsoft's counting rules above say nesting adds to the SID count, so treat this list as a lower bound.
The cmdlet page also describes the -ResourceContextServer parameter, which makes the cmdlet "return a list of groups that the user is a member of and that reside in the specified domain", and says to use it to search for groups in a domain that is not the domain where the user's account resides. Its Example 3 combines it with -ResourceContextPartition. For a server in a second domain, run the same command against a server in that domain:
Get-ADPrincipalGroupMembership -Identity <UserName> -ResourceContextServer <ResourceDomainServer>
- If the user can still sign in to a machine in a domain where the token is smaller, ask them to run
whoami /groups. Microsoft'swhoamipage says/groups"Displays the user groups to which the current user belongs", and/allshows everything in the current access token. This shows the groups in a token that was built successfully. It is not an exact count of SIDs for the failing server's domain. - Rule out the neighbouring fault. The limit behind error 1384 is 1,000 SIDs in the access token. Microsoft's Kerberos page describes a different limit: "if the user belongs to more than 120 universal groups, the default MaxTokenSize value does not create a large enough buffer to hold the information." Its symptoms include a message such as "HTTP 400 - Bad Request (Request Header too long)". If you see that message and not error 1384, you are on the Kerberos page's problem, not this one.
For that neighbouring problem, the Kerberos page gives a formula for the size of the token: TokenSize = 1200 + 40d + 8s. For Windows Server 2012 and later, d is the number of memberships in universal groups outside the user's account domain plus the number of SIDs stored in sIDHistory, and s is the number of memberships in universal groups inside the account domain plus domain-local and global group memberships. The page gives no equivalent formula for the 1,000 SID limit in error 1384.
Example (illustrative): at contoso.com.au a consultant's account was added to 40 project groups over three years, and each project group is a member of three server-local groups in the resource domain. Direct membership shows 40 groups. Counting as Microsoft's example does, each project group adds 1 + 3 = 4 to the count in the resource domain, which gives 160. The consultant is nowhere near 1,000 on paper, so the count alone does not explain the error. Look next for a second, larger source: old sIDHistory entries or a group nested across several levels.
Fix
Microsoft's page documents the limit and says that the behaviour is by design. It gives no way to raise it. Its Kerberos page describes a "Size limit of 1,010 group SIDs for the LSA access token" as similar, but says "the calculations and conditions that govern the issue are different" from those for MaxTokenSize, and gives no setting for it. A MaxTokenSize change is therefore not a documented response to error 1384. The response suggested here is advice reasoned from the stated cause, not a step on Microsoft's page: reduce the number of groups the user is in or is counted into.
Before you change membership, save the user's current groups. The command from step 2 writes them to a file:
Get-ADPrincipalGroupMembership -Identity <UserName> > C:\Temp\<UserName>-groups-before.txt
Risk: The next step removes one user from one or more groups. The groups may grant access to shares, applications or mailboxes, so the user can lose access to them immediately. Remove only groups that the user's manager or the data owner has confirmed are no longer needed.
Remove the user from one group with the Remove-ADGroupMember cmdlet, whose page gives the form Remove-ADGroupMember -Identity DocumentReaders -Members DavidChew:
Remove-ADGroupMember -Identity "<GroupName>" -Members <UserName>
The cmdlet asks you to confirm each removal. Do this for one group at a time, and test sign-in after each.
To undo it: add the user back with Add-ADGroupMember, using the saved list to see which group to restore:
Add-ADGroupMember -Identity "<GroupName>" -Members <UserName>
Microsoft's page for the cmdlet gives the same form, with -Identity for the group and -Members for the accounts to add.
If the count comes from a nested group rather than a direct membership, removing the user from that group is not the change. Instead, the group nested in the second domain needs to change, which is a design decision for the owner of that domain. Microsoft's page gives no command for it.
Confirm the fix
- The user signs in to the domain and connects to the share that failed with error 1384.
- The user can still reach what they need. Check the main applications and shares before you close the change.
- Compare
Get-ADPrincipalGroupMembershipoutput with your saved file. Only the groups you removed are missing.
What to watch afterwards
- Other accounts created from the same template or added to the same project groups. The same pattern can hit them later.
- New nested group structures in resource domains, because each level adds to the count.
- Accounts with
sIDHistoryvalues still present. - On Windows Server 2012 and later, the Kerberos page says Windows can log event ID 31 if the token size passes a threshold, once the Group Policy setting Computer Configuration\Administrative Templates\System\KDC\Warning for large Kerberos tickets is configured. That relates to the Kerberos token size, not directly to the 1,000 SID limit.
Read next
Related articles you may want next.
- TroubleshootingKerberos fails after the RC4 change: finding the accounts and devices that still depend on RC4After domain controller updates or an RC4 policy change, a share, remote PowerShell or a non-Windows device stops signing in with Kerberos. Read the KDCSVC and 4769 events, find what only has RC4, and fix it without reopening RC4 for the whole domain.Read article
- TroubleshootingAccount Keeps Locking Out: Find the Source From Event 4740 to the ProcessAccount keeps locking out? Read event 4740 on the PDC emulator, follow 4771, 4776 and 4625 to the source computer, then find the stale credential there.Read article
- HostingIdentity for hosted servers: extend your domain, build a new one, or use Entra IDWhich sign-in and directory design suits Windows servers moved to a hosting provider: extending the existing Active Directory domain, building a separate domain, or using Microsoft Entra services, with what each depends on.Read article
Risks and limits
These steps have not been run or lab-tested. Microsoft's error 1384 page (original KB 275266) gives only the limit and the counting rules. It does not give a tool for counting SIDs in a token and does not say how the count relates to the whoami or Get-ADPrincipalGroupMembership output. Microsoft's pages give two figures for related limits, 1,000 SIDs in the 1384 page and 1,010 group SIDs for the LSA access token in the Kerberos page, and do not reconcile them. Trimming group membership is advice, reasoned from the cause Microsoft states; Microsoft's page documents no fix. Removing a user from groups is a change to access and needs the owner's approval.
Sources
- Error 1384 when you log on to a domain — Microsoft Learn, last updated 2026-02-12
- Problems with Kerberos authentication when a user belongs to many groups — Microsoft Learn, last updated 2026-02-12
- Get-ADPrincipalGroupMembership — Microsoft Learn, date not shown
- Remove-ADGroupMember — Microsoft Learn, date not shown
- Add-ADGroupMember — Microsoft Learn, date not shown
- whoami — Microsoft Learn, last updated 2025-05-26
This article was originally published on .