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.
Users open an internal site that should sign them in automatically with their Windows account. Instead the browser asks for a user name and password. They type valid details, it asks again, three times in all, and then shows:
HTTP Error 401. The requested resource requires user authentication.
Microsoft describes this as the common symptom when Kerberos fails for a site using Windows authentication (Microsoft Learn, Troubleshoot Kerberos failures - Internet Information Services).
What you see
- Three password prompts, then a 401 page, even with correct details.
- In the site's IIS log, requests ending in 401 2 (status 401, substatus 2) or 401 1 with win32 status 2148074245, as in Microsoft's examples.
- It may work for some sites on the server and not others, or work by server name but not by a friendly site name. This follows from the SPN causes below.
Why it happens
Kerberos needs the browser to ask a domain controller for a ticket for the site's service principal name (SPN), such as http/web-server. The domain controller encrypts the ticket with a key from the password of the account that owns that SPN. Only a process running as that account can decrypt it. When any step fails, Kerberos is not used: the browser may fall back to NTLM, or the sign-in fails.
Microsoft's page lists the checks in order. The ones that most fit this symptom are:
- The browser does not treat the site as one to send Windows credentials to. In Microsoft Edge, integrated authentication goes only to servers on the
AuthServerAllowlistpolicy. If that policy is not set, "Microsoft Edge tries to detect if a server is on the intranet - only then does it respond to IWA requests". A site the browser takes for an internet site is not sent credentials (Microsoft Learn, AuthServerAllowlist). - IIS is not offering Negotiate. Kerberos needs IIS to send the
WWW-Authenticate: Negotiateheader. By default IIS sends both Negotiate and NTLM. - No SPN, or the wrong account, for the site name. If the application pool runs as an account other than the built-in ones, Microsoft says an SPN for the site must be declared with
setspnand associated with that account. - Duplicate SPNs. The same SPN registered on two accounts means the domain controller may encrypt the ticket for the wrong one. Microsoft says this typically produces KRB_AP_ERR_MODIFIED errors.
- Kernel-mode authentication with a custom pool account. Kernel-mode authentication, on by default, decrypts tickets with the computer account. If the SPN is registered to a user account used as the pool identity, kernel mode cannot decrypt the ticket. Microsoft says this is typical of web farms using a shared load-balanced name.
- Browser and server on the same computer. By default Kerberos is not enabled in this setup.
The browser also builds the SPN from the name it resolves. Microsoft explains that for an alias (CNAME), Internet Explorer requests the SPN for the computer name the alias points to, and by default leaves out a non-standard port.
How to prove the cause
1. Confirm Kerberos is failing, not just slow. Microsoft suggests a test page that reports the authentication method, or a browser trace. A Kerberos request is large, more than 2,000 bytes, because the Authorization header carries the ticket. An NTLM request is much smaller.
2. Check the browser's allowlist. In Edge, open edge://policy and look for AuthServerAllowlist. If it is set, the site's host name must match an entry. Entries are separated by commas and may use wildcards, as in Microsoft's example *contoso.com,contoso.com. If it is not set, Edge decides for itself whether the site is on the intranet. A fully qualified name with dots, or an IP address, may not be treated as intranet. For Google Chrome, check Chrome's own policy for allowed authentication servers.
3. Check Windows Authentication in IIS. In IIS Manager, open the site's Authentication feature, select Windows Authentication, and check it is enabled and its Providers include Negotiate. Microsoft's configuration reference lists the defaults as Negotiate, then NTLM (Microsoft Learn, Windows Authentication <windowsAuthentication>).
4. Ask for a ticket from a client. klist shows the user's cached Kerberos tickets. klist get requests a ticket for a named SPN (Microsoft Learn, klist). Using Microsoft's example SPN:
klist get http/web-server
If the ticket request fails, Microsoft says Kerberos is not used and NTLM fallback may occur, because the SPN is unknown to the domain controller.
5. List the SPNs and look for duplicates (Microsoft Learn, setspn):
setspn -L <accountname>
setspn -T * -T contoso -X
The first lists the SPNs on the pool's account (or on the server's computer account). The second, from Microsoft's examples, searches the current domain and the contoso domain for duplicates.
6. Compare the pool identity with the SPN's owner. In IIS Manager, read the application pool's Identity. If it is a domain user account and the site's SPN is on that account, check whether kernel-mode authentication is still on.
The fix
Fix the step the checks found:
- Browser allowlist: add the site's host name to
AuthServerAllowlistthrough Group Policy (Administrative Templates > Microsoft Edge > HTTP authentication > Configure list of allowed authentication servers), or through the registry valueAuthServerAllowlist(REG_SZ) underHKLM\SOFTWARE\Policies\Microsoft\Edge. Microsoft says the change needs a browser restart. Setting the policy replaces Edge's own intranet detection, so list every site that should get Windows sign-in. - Negotiate missing: add Negotiate to the Windows Authentication Providers for the site.
- SPN missing: register the site name on the account that runs the application pool. Microsoft says to use
setspn -S, which checks for duplicates first, rather thansetspn -A. Microsoft's example for a user account:
setspn -U -S http/MyServer User01
- Duplicate SPN: remove the SPN from the account that should not have it, with
setspn -D, so it is registered once. - Kernel mode with a custom pool account: Microsoft gives two options. Set useAppPoolCredentials to true, which keeps kernel mode and decrypts the ticket with the pool's identity. Or turn kernel mode off, which Microsoft does not recommend for performance.
- No custom account needed: Microsoft says that without an explicit SPN, Kerberos works only when the pool runs as Network Service, ApplicationPoolIdentity or another system account, using the computer's default SPN. It follows that a site under the server's own name, with the default pool identity, needs no extra SPN.
How to confirm the fix
- A user in the domain opens the site with no prompt.
- A test page or trace shows Kerberos (the large
Authorization: Negotiaterequest) rather than NTLM. kliston the client lists a ticket for the site's SPN.- The IIS log no longer ends the sign-in with a 401. It follows that the page request is answered with a success status instead.
What to watch afterwards
- New host names, load-balanced names and pool identity changes. Each changes which SPN and which account matter, and each needs the SPN checked again. This follows from how Microsoft describes ticket decryption.
- Duplicate SPNs after a server rebuild or a second server is added with the same name. Run the
setspn -Xcheck again. - Delegation. If the site works but cannot pass the user on to a back-end server, that is a separate delegation problem. Microsoft lists the browser setting and the Trusted for delegation setting on the pool's account as the first checks.
Read next
Related articles you may want next.
- TroubleshootingKRB_AP_ERR_MODIFIED: duplicate SPNs and the wrong account behind a nameUsers get password prompts or access denied on a web, file or app service, and the System log shows Kerberos event 4 KRB_AP_ERR_MODIFIED. Find which account holds the service name, remove duplicates with setspn, and confirm Kerberos works.Read article
- TroubleshootingBefore Restricting NTLM: Inventory Who Uses It and Why Kerberos Was Not UsedAudit NTLM before blocking it: enable the Restrict NTLM audit policies, read the NTLM Operational log and event 4624, fix IP and SPN fallbacks, then restrict in rings.Read article
- TroubleshootingIIS web app gets "access denied" on a folder or share: grant the application pool identity, not EveryoneWhen a site on IIS cannot read or write a file, the account that needs permission is the application pool identity, IIS AppPool\<pool name>, or the server's computer account for a network share. Grant that account only the access it needs.Read article
Risks and limits
- Microsoft's Kerberos troubleshooting page dates from the Internet Explorer era (2022). Its server-side steps still apply: SPNs, kernel-mode authentication, duplicate SPNs, the Negotiate provider,
klistandsetspn. Its browser steps (security zones, Automatic logon, the alias and port behaviour, and the feature registry keys) are Internet Explorer settings. This article uses the Edge policy page for the browser side instead. - Microsoft says the built-in identities used without an SPN are not recommended for this purpose because they're a security risk. Weigh that before changing a pool's identity just to avoid registering an SPN.
- Changing SPNs affects every service using that name. It follows that removing or moving an SPN can break another application that relied on it; list before you change.
setspnneeds an elevated prompt and rights to change the account's SPN property, which Microsoft says you may not have on some account objects.klist purgedeletes all of the user's cached tickets. Microsoft warns it may stop them reaching resources until they sign out and back in.- Microsoft says Kerberos for a browser and server on the same computer needs the
DisableLoopBackCheckregistry setting, described in a separate article not covered here.
Sources
- Microsoft Learn, "Troubleshoot Kerberos failures - Internet Information Services", last updated 25 January 2022: https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/iis/www-authentication-authorization/troubleshoot-kerberos-failures-ie
- Microsoft Learn, "Microsoft Edge Browser Policy Documentation: AuthServerAllowlist": https://learn.microsoft.com/en-us/deployedge/microsoft-edge-browser-policies/authserverallowlist
- Microsoft Learn, "Windows Authentication <windowsAuthentication>", last updated 23 March 2022: https://learn.microsoft.com/en-us/iis/configuration/system.webserver/security/authentication/windowsauthentication/
- Microsoft Learn, "setspn", last updated 24 March 2025: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setspn
- Microsoft Learn, "klist", last updated 3 February 2023: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/klist
Next step
Repeated prompts and a 401 on an intranet site mean Kerberos is failing at one step: the browser allowlist, the Negotiate header, the SPN or the account that decrypts the ticket. NetLeverage has looked after business servers since 2002. If your users are still prompted, talk to us through managed support with the site's host name, its application pool identity and the IIS log lines for a failed sign-in.
This article was originally published on .