While accessing a service that uses network shares on a middle-tier server, users are prompted for credentials, and they eventually encounter an access denied error. In today’s post, we will present a couple of case scenarios, identify the cause and then provide the possible workarounds to the issue of why constrained delegation for CIFS fails with ACCESS_DENIED error in Windows 10.
Common Internet File System (CIFS) is a file-sharing protocol that provides an open and cross-platform mechanism for requesting network server files and services. CIFS is based on the enhanced version of Microsoft’s Server Message Block (SMB) protocol for Internet and intranet file sharing.
Constrained delegation for CIFS fails in Windows
You may encounter this issue if the user is prompted for credentials, and access eventually fails with an access denied error based on the following three scenarios.
Scenario 1
- The IIS website is set up with the home directory pointing to the remote share using pass-through authentication and constrained delegation configured for CIFS.
- The IIS application pool accessing that share is running under the identity of the service account.
- The domain account is trusted for delegation for the CIFS service on the file server.
Scenario 2
- The web app is trying to access a file server as a user.
- The IIS application pool that accesses that share is running under the identity of the service account. The domain account is trusted for delegation for the CIFS service on the file server.
- Constrained delegation configured for CIFS is configured on the service account for the file server.
Scenario 3
- Any server-side application that’s being accessed from a client is accessing remote shares as a user.
- The server-side application is running under the context of a service account.
- The Service account is trusted for delegation and configured for CIFS delegation for the file server.
This has been identified as a problem between MrxSmb 2.0 and Kerberos when constrained delegation is involved.
To resolve this issue, Microsoft offers two workarounds.
Workaround 1
Use a machine account instead of a service account as the identity for applications that will be performing constrained delegation for CIFS. Configure constrained delegation when the domain functional level is Windows Server 2003, Windows Server 2008, or Windows Server 2008 R2.
To do this on the domain controller for your web servers domain, do the following:
- Click Start > Administrative Tools > Active Directory Users and Computers.
- Expand domain, and then expand the Computers folder.
- In the right pane, right-click the computer name for the webserver, select Properties, and then click the Delegation tab.
- Select the Trust this computer for delegation to specified services only checkbox.
- Make sure that Use Kerberos only is selected, and then click OK.
- Click the Add button.
- In the Add Services dialog box, click Users or Computers, and then browse to or enter the name of the file server that will receive the user’s credentials from IIS.
- Click OK.
- In the Available Services list, select the CIFS service.
- Click OK.
Workaround 2
This workaround is not recommended because it requires Use any authentication protocol delegation on the computer account. If the Use any authentication protocol option is selected, the account is using constrained delegation with protocol transition.
If you must use the identity of applications as a service account and/or domain account, then do the following:
Step 1
- Click Start > Administrative Tools > Active Directory Users and Computers.
- Expand domain, and then expand the Computers folder.
- In the right pane, right-click the computer name for the webserver, select Properties, and then click the Delegation tab.
- Select the Trust this computer for delegation to specified services only checkbox.
- Make sure that Use any authentication protocol is selected.
- Click OK.
- Click the Add button.
- In the Add Services dialog box, click Users or Computers, and then browse to or enter the name of the file server that will receive the user’s credentials from IIS.
- Click OK.
- In the Available Services list, select the CIFS service.
- Click OK.
Step 2
- In the left pane, expand the Users folder.
- In the right pane, right-click the service account that’s the identity of the application pool, select Properties, and then click the Delegation tab.
- Select the Trust this computer for delegation to specified services only checkbox.
- Make sure that Use Kerberos only is selected.
- Click OK.
- Click the Add button.
- In the Add Services dialog box, click Users or Computers, and then browse to or enter the name of the file server that will receive the user’s credentials from IIS.
- Click OK.
- In the Available Services list, select the CIFS service.
- Click OK.
I hope this post helps.