Use this when IIS sites reject users or prompt unexpectedly.
Authentication
IIS authentication sets how users prove identity to a site: Anonymous, Windows (Kerberos or NTLM), Basic over TLS, client certificates, or forms and OAuth handled by the application.
request → authentication modules → identity → authorisation
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
# Which methods are enabled for a site/app?
Get-WebConfigurationProperty -PSPath 'IIS:\Sites\intranet' -Filter 'system.webServer/security/authentication/anonymousAuthentication' -Name enabled
Get-WebConfigurationProperty -PSPath 'IIS:\Sites\intranet' -Filter 'system.webServer/security/authentication/windowsAuthentication' -Name enabled
Get-WebConfiguration -PSPath 'IIS:\Sites\intranet' -Filter 'system.webServer/security/authentication/windowsAuthentication/providers/add' | Select-Object value
# Kerberos: is there an SPN for the name users type?
setspn -Q HTTP/intranet.corp.example.com
On a client, after opening the site, klist should show a ticket for HTTP/intranet.corp.example.com; if not, the browser used NTLM (or the site is not in the browser's intranet zone, so no automatic logon happened).
Step 2 Common mistakes Narrow the fault
- Enabling anonymous and Windows authentication with unclear precedence.
Step 3 Known-good and broken paths Narrow the fault
Known-good: DNS/time/principal scope is correct, credential validation reaches LSASS/domain services as intended, the correct SPN/ticket/token is issued and the protected resource accepts that security context. Broken: authentication can succeed with a fallback mechanism while Kerberos is broken; a ticket can exist for the wrong SPN; a token can be valid yet lack effective authorization at the resource.
Step 4 Failure boundaries Narrow the fault
- Client — browser zone/policy prevents automatic Windows logon.
- Name/SPN — Kerberos ticket for the name cannot be issued or decrypted (see Kerberos).
- IIS configuration — wrong methods enabled, locked sections, provider order.
- Delegation — the app must call a back end as the user (double hop) and needs constrained delegation.
- Authorisation — authenticated but denied by URL rules, NTFS or the app.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Windows authentication negotiates Kerberos or falls back to NTLM.
- Anonymous access must be disabled for Windows-auth-only sites.
- Basic authentication must only be used over TLS.
Get-Website— sites, state, bindingsGet-IISAppPool— application pools and stateGet-WebBinding— bindingsGet-ChildItem IIS:\SslBindings— certificate bindingsGet-Content C:\inetpub\logs\LogFiles\W3SVC<id>\*.log -Tail 20— request log
ReferenceWhat it is1 section · depth on demand
Direct Answer
IIS authentication decides who the user is before the app runs: Anonymous for public content, Windows (Negotiate → Kerberos, NTLM fallback) for intranet apps, Basic only over HTTPS, or app-level OIDC/SAML. For Kerberos the HTTP/<name> SPN must be on the computer account with kernel-mode authentication — or on the app pool's domain account when useAppPoolCredentials is set. Repeated login prompts usually mean SPN or browser-zone problems.
ReferenceWhy it matters1 section · depth on demand
Internals, ownership and state
Authentication runs in the IIS pipeline before handlers. Anonymous requests use the anonymous user identity (IUSR by default, or the app pool identity if configured). Windows authentication produces a Windows token for the user that the application can impersonate. Results can be cached per connection (authPersistNonNTLM), which matters behind load balancers that reuse connections between users. The site owner chooses methods in web.config (system.webServer/security/authentication), but many sections are locked at server level by default and must be unlocked in applicationHost.config.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
IIS authentication modules decide who the user is before the application runs. Enable only what the application needs; with several enabled, browsers negotiate and confusing results follow.
| Method | How it works | Use |
|---|---|---|
| Anonymous | No credentials; requests run as IUSR or the app pool identity | Public content |
| Windows | Negotiate (Kerberos, falling back to NTLM) or NTLM | Intranet apps for domain users |
| Basic | Username/password in every request (base64) | Only over HTTPS; legacy clients |
| Digest | Hashed challenge-response | Rarely used |
| Client certificate mapping | TLS client certificate mapped to an account | Device or high-assurance user auth |
| Application-level (Forms, OIDC/SAML middleware) | The app redirects to an IdP | Modern web apps; anonymous enabled at IIS level |
Windows authentication and Kerberos
The default providers are Negotiate and NTLM. With kernel-mode authentication (useKernelMode, default on), HTTP.sys decrypts Kerberos tickets with the computer account key, so the HTTP/<name> SPN must be on the computer account — unless useAppPoolCredentials="true" makes it use the app pool's domain identity, whose account then needs the SPN. Accessing a site through a name without a matching SPN, or through an alias/load-balancer name registered on the wrong account, silently falls back to NTLM or fails. Extended Protection (Accept/Required) binds authentication to the TLS channel against relay attacks.
Authorisation is separate: URL Authorization rules, NTFS permissions on files, and the application's own role checks.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IIS → Authentication. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/iis/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Deep reference
Healthy vs suspicious evidence
Output interpretation
| Observation | Meaning |
|---|---|
| 401.1 | Credentials rejected |
| 401.2 | No enabled method acceptable to the client — authentication configuration |
| Repeated login prompts in the browser | Kerberos failing and NTLM not completing (SPN on wrong account, site not in intranet zone, double-hop) |
| Works on the server itself, prompts elsewhere | Loopback/name check or SPN/zone issue for the external name |
App sees IUSR instead of the user | Anonymous still enabled and served first |
| Works direct to a node, fails via load balancer | SPN registered for node names only, or kernel-mode auth with different computer accounts on each node |