Event logs are generally descriptive, intended to help you understand what is happening. However, the default events do not always provide the level of detail that is needed for effective troubleshooting. In this case, configure ADFS debug logging.
ADFS provides several levels of debug information that are available for troubleshooting ADFS problems. Use the procedures in this section for enabling debug logging and setting appropriate debug logging levels on federation servers, federation proxy servers, and Web servers that are running ADFS Web Agents.
The debug log file is located in %systemdrive%\ADFS\logs.
Depending on the level of debug logging you enable, you will see the following tags in debug logs:
[INFO] - Displays information about events, such as redirects with protocol Uniform Resource Locators (URLs), token validations, or claim mappings.
[VERBOSE] - Displays information about events, such as sign-in requests, responses, token contents, Web method calls, and security identifier (SID) information.
[ERROR] - Displays events for significant problems in the debug log.
[WARNING] - Displays events, which are not necessarily significant but that may cause future problems.
[EVENTLOG] - Displays all ADFS events.
Although all information in the log file could be useful, you can look at the lines that are tagged [ERROR] and [WARNING] first to quickly assess the problem.
For example, the following section of a debug log file shows that certificate chain validation is failing.
----------------
2005-11-09T19:46:47 [INFO] Requesting token for https://adfsweb.treyresearch.net/ from FS using inbound token.
2005-11-09T19:46:47 [VERBOSE] Parse: Token NOT found in cache
2005-11-09T19:46:47 [VERBOSE] SAML: effectivetime = 11/09/2005 19:46:53
expirationtime = 11/09/2005 20:46:53
2005-11-09T19:46:50 [WARNING] VerifyCertChain: Cert chain did not verify - error code was 0x80092013
2005-11-09T19:46:50 [ERROR] KeyInfo processing failed because the trusted certificate does not have a a valid certificate chain. Thumbprint = BAF02C45AF23389CC7FEC615615056021E107C3E
2005-11-09T19:46:50 [WARNING] Failing signature verification because the KeyInfo section failed to produce a key.
2005-11-09T19:46:50 [WARNING] SAML token signature was not valid: AssertionID = _cbe6e3ca-fb90-4a93-a789-b925856163d0
2005-11-09T19:46:50 [VERBOSE] Processing FS response: policy version is a9d515c1-6965-4aa7-a78e-3cfc77f0dd2a - 16
2005-11-09T19:46:50 [INFO] Token issuance request to FS failed: ValidationFailure
2005-11-09T19:53:14 [VERBOSE] Processing HTTP GET: https://adfsresource.treyresearch.net/adfs/ls/?wa=wsignin1.0&wreply=https://ADFSWeb.TREYRESEARCH.NET/&wct=2005-11-09T19:53:13Z&wctx=https://adfsweb.treyresearch.net/default.aspx
2005-11-09T19:53:14 [VERBOSE] Received SignIn Request.
2005-11-09T19:53:14 [VERBOSE] HOMEREALM: Realm could not be determined.
2005-11-09T19:53:14 [INFO] Received signin request via query string.
2005-11-09T19:53:14 [VERBOSE] Sign In Request Dump
--------------------
As you can see in the log text, even the thumbprint of the certificate is provided.
You can run the following command against the .cer file of the certificate to get more information about the failure.
certutil –v –urlfetch -verify
CertFileName
.cer
On federation account, resource, and proxy servers, you can use the Windows UI to enable debug logging and set levels to increase the detail of feedback in the logs.
Perform the following procedure on an account or resource federation server or federation proxy server.
Administrative credentials
To complete this procedure, you must be a member of the Administrators group on the local computer.
To set ADFS debug levels on federation servers and federation proxy servers
-
Click Start, point to Administrative Tools, and then click Active Directory Federation Services.
-
Right-click Federation Service or Federation Service Proxy, and then click Properties.
-
On the Troubleshooting tab, select debug levels as appropriate, and then click OK.
Note |
|
To see descriptions for each debug level, click Help on the Troubleshooting tab. |
To enable debug logging on Web servers, you need to edit the registry on the servers that you are troubleshooting.
You can enable debug logging for the following components:
-
The ADFS Web Agent running on ADFS Web servers has two components:
-
ADFS Token Authentication service (ifssvc.exe), which validates incoming tokens and cookies. Debug logging creates ifssvc.log.
-
ADFS Web Agent Internet Server Application Programming Interface (ISAPI) extension (ifsext.dll), which handles the protocols that are used by ADFS to authenticate requests; and the ADFS Web Agent ISAPI filter (ifsfilt.dll), which assists the extension and enables user name logging in the Internet Information Services (IIS) log files. Debug logging creates the ifsext_StsAppPool1.log and ifsfilt_StsAppPool1.log, respectively in the %systemdrive%\ADFS\Logs directory.
-
In addition, the ADFS Web Agent authentication package (ifsAp.dll) is used by Windows NT token-based applications for generating tokens when Service-for-User (S4U) is not available. Debug logging creates ifsap.log.
You can enable debug logging for each of these components in the registry on ADFS Web servers.
Administrative credentials
To complete these procedures, you must be a member of the Administrators group on the local computer.
To enable debug logging for the ADFS Token Authentication service
-
Open Regedit.
-
Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ifssvc\Parameters
-
Right-click Parameters, click New, and then click DWORD Value.
-
In the new value file name box, type the following, and then press Enter:
DebugPrintLevel
-
Double-click the new entry and then, in Value data, type the following, and then click OK:
FFFFFFFF
To enable debug logging for the ADFS ISAPI extension and filter
-
Open Regedit.
-
Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ADFS\WebServerAgent
-
Right-click WebServerAgent, click New, and then click DWORD Value.
-
In the new value file name box, type the following, and then press Enter:
DebugPrintLevel
-
Double-click the new entry and then, in Value data, type the following, and then click OK:
FFFFFFFF
To enable debug logging for the ADFS Web Agent authentication package (for Windows NT token-based applications)
-
Open Regedit.
-
Navigate to:
HKEY_LOCAL_MACHINE_SYSTEM\CurrentControlSet\Lsa\WebSso\ Parameters
-
Right-click Parameters, click New, and then click DWORD Value.
-
In the new value file name box, type the following, and then press Enter:
DebugLevel
-
Double-click the new entry and then, in Value data, type the following, and then click OK:
FFFFFFFF