How-to guide
How to Debug SAML Logins With SAML-tracer
How-to
How to Debug SAML Logins With SAML-tracer
On this page
- The short answer
- What does the SAML-tracer browser extension do?
- How do you capture a SAML login in Chrome?
- How do you read what SAML-tracer captured?
- Why do some SAML messages look different in the tracer?
- Which SAML errors can you find in the decoded XML?
- How do you get a clean run when the SSO session keeps interfering?
- How do you share a SAML trace without leaking data?
- When should you use Chrome DevTools instead of, or alongside, SAML-tracer?
- Which other extensions help with SSO and login debugging?
- Frequently asked
The short answer
SAML-tracer is a browser extension that records the HTTP traffic of a login and decodes any SAML request or response into readable XML. Open it before you sign in, reproduce the failure, click the message flagged SAML, and read the Status, Audience, Destination and time conditions to find the mismatch.
What does the SAML-tracer browser extension do?
SAML-tracer watches the requests your browser makes during a single sign-on flow and shows you the SAML messages inside them. Those messages are normally compressed or base64-encoded, so you cannot read them in the address bar.
In a browser-based SAML login, the service provider (the app) sends you to the identity provider (your SSO), and the identity provider sends you back with a signed assertion. Everything passes through your browser, which makes the browser the best place to look when a login fails.
The extension started life as a Firefox add-on and now has a Chrome version. Its source and issue tracker are on the SAML-tracer GitHub page, and we list it in the directory as SAML-tracer. The other directory extensions below help with the surrounding steps.
Install it from its Chrome Web Store page like any other extension, then pin it from the puzzle-piece menu so the icon is one click away. It needs wide access to web requests, because that is how it sees the traffic. Read what browser permissions mean before adding any tool with that reach, and remove it when the investigation is over. You can also open it with the Alt + Shift + S keyboard shortcut.
How do you capture a SAML login in Chrome?
Open the tracer first, then sign in. The tool only records what happens after its window is open, so starting late means missing the message you need.
- Click the SAML-tracer icon in the toolbar, or press
Alt + Shift + S. A separate tracer window opens; keep it visible next to the browser. - Clear any old entries with the
Clearbutton so the list only shows the new attempt. - In your main window, open the application's login page in a fresh tab or a private window (see the session section below).
- Start the SSO flow, enter your credentials at the identity provider, and let it fail or complete.
- Click
Pausein the tracer once the error page loads, so later requests do not push the SAML entries out of view.
Requests that carry a SAML message are highlighted with a SAML logo at the right of the request list. Ordinary page loads, images and scripts appear too; turn on Hide resources or Show protocol requests only in the toolbar to cut the noise.
Keep the flow on one screen
SAML logins bounce through several redirects in under a second. If the page redirects away before you can look, leave the tracer running, reproduce once, then pause and read the list top to bottom instead of chasing it live.
How do you read what SAML-tracer captured?
Click a request in the list, then use the tabs at the bottom of the tracer to see it from different angles. The SAML tab is the one that matters most.
- HTTP
- Raw request and response headers, including the
Locationheader on redirects andSet-Cookievalues, which is where to spot a missing session cookie after the return trip. - Parameters
- Query string or form fields, including the
SAMLRequest,SAMLResponseandRelayStatevalues in their encoded form. - SAML
- The decoded XML of the request or response, so you can read the issuer, destination, conditions and attributes.
A normal login shows at least two SAML entries. The first is the AuthnRequest going from the app to the identity provider. The second is the Response going back to the app's assertion consumer service (ACS) URL.
If you only see the request and no response, the identity provider stopped before issuing an assertion. If you see the response but the app still rejects it, the fault is usually a value inside that response, which is what the next sections cover.
Why do some SAML messages look different in the tracer?
SAML messages can travel in two common ways, called bindings, and the tracer shows each differently. Knowing which one you have explains what you see in the Parameters tab.
| Binding | How it travels | What you see in the tracer |
|---|---|---|
| HTTP-Redirect | SAMLRequest in the URL query string, deflated then base64 encoded | A GET request with a long URL; the SAML tab shows decoded XML |
| HTTP-POST | Hidden form field, base64 encoded, submitted automatically by the browser | A POST request with a SAMLResponse parameter; the SAML tab shows decoded XML |
Requests from the app to the identity provider commonly use the redirect binding. Responses carrying assertions almost always use the POST binding, because they are too large for a URL.
A related trap is RelayState. It is an opaque value the app sends along so it can return you to the right page after login. If it is lost between the two legs, you land on a default page instead of where you started, and that is a configuration problem rather than an assertion problem.
Which SAML errors can you find in the decoded XML?
Most failed SAML logins come down to a small set of mismatched values. Open the decoded response and check each field against what the application has configured.
| Where to look | What to compare | Typical symptom |
|---|---|---|
StatusCode in Status | Should end in Success | Values such as Responder, Requester or AuthnFailed mean the identity provider refused; read StatusMessage if present |
Audience in AudienceRestriction | Must equal the app's entity ID exactly | App reports an audience or entity ID error |
Destination and Recipient | Must match the app's ACS URL, including scheme and trailing slash | App rejects the response as sent to the wrong endpoint |
NotBefore and NotOnOrAfter | Current time must fall inside the window | Failure that appears and disappears; often clock drift between systems |
InResponseTo | Should match the ID of the original AuthnRequest | Response rejected as unsolicited or replayed |
NameID and attributes | Format and values the app expects, such as email | Login succeeds at the IdP but the app shows no account or missing role |
Signature and certificate | Signing certificate must match what the app trusts | Signature validation failure, common after certificate rotation |
Work from the top of that table down. A non-success status makes the rest irrelevant, while a success status with a mismatched audience is a configuration fix on one side.
Whose fault is it?
Audience, ACS URL and certificate problems are almost always a setup mismatch between the two systems. Attribute problems are more often an identity provider mapping issue. Compare the value you captured with the application's SSO settings page, not with your memory of them.
How do you get a clean run when the SSO session keeps interfering?
If you are already signed in to the identity provider, the flow skips the login screen and you may never see a fresh request. A clean session gives you a repeatable trace.
The simplest option is a private window, but extensions do not run in private windows unless you allow it. Open chrome://extensions, choose Details on SAML-tracer, and switch on Allow in Incognito.
The other option is to clear the session cookies for the two domains involved. Cookie-Editor lets you delete individual cookies for the current site without touching the rest of your browsing. Clear Cache does a broader reset in one click, at the cost of signing you out elsewhere.
- Test as a new user: use a second Chrome profile with only the tracer installed, so no other extension changes headers or blocks scripts.
- Try a forced login: some applications can send a request that forces the identity provider to prompt again, which is useful when you suspect a stale session.
- Watch the Set-Cookie headers: if the app never sets its session cookie after the response, the assertion was rejected even if the page looks normal.
If cookies are the suspect, Cookie Manager can export the state before and after a failed attempt so you can compare them.
When should you use Chrome DevTools instead of, or alongside, SAML-tracer?
Use DevTools for network, console and cookie details, and SAML-tracer for decoding the SAML payload. The two answer different questions, and combining them covers most SSO failures.
- Press
F12orCtrl + Shift + I(Cmd + Option + Ion Mac) to open DevTools. - Open the
Networktab and tickPreserve log, so redirects do not clear the list. - Tick
Disable cache, then reproduce the login. - Look at the status codes of each hop: a
302is a redirect, a200with a form is the POST binding, and a4xxor5xxpoints to a server-side error page. - Switch to the
Applicationtab to inspect cookies and checkSameSiteandSecureflags on the app's session cookie.
DevTools can show the raw base64 SAMLResponse, but it will not decode it for you. That is the gap the tracer fills. If you have not used the panel before, read how to enable developer mode in Chrome for the related settings.
Some SSO failures are not SAML at all. A blocked third-party cookie, an extension that rewrites headers or a corporate proxy can break the flow before any assertion is created. If the trace shows no SAML message, check those first.
Which other extensions help with SSO and login debugging?
SAML-tracer covers the assertion, but a few other tools make the surrounding work quicker. Browse the developer tools category or the developers hub for more.
SAML-tracer and helpers for a debugging session
-
SAML-tracerFree
Developer Tools
Traces SAML messages in browser requests for debugging single sign-on. Catch: it needs broad access to web requests to do that, so remove it once the investigation is over.
-
Cookie-EditorFree
Developer Tools
Inspect and delete the session cookies on the app and IdP domains; it reads cookies for sites you allow, so restrict it when you finish.
-
Clear CacheFree
Developer Tools
Resets cache and cookies in one click to force a fresh login; it signs you out of everything cleared, not just the SSO app.
-
Developer Tools
Edits, protects or blocks individual cookies to test how the app reacts; changes affect live sessions.
-
JSON FormatterFree
Developer Tools
Pretty-prints JSON when the failing app also exposes an API or a token endpoint; it does not read XML.
-
Developer Tools
Helps when an identity provider treats some browsers differently; spoofing can trigger extra bot checks.
-
Window ResizerFree
Developer Tools
Snaps the browser next to the tracer window so you can watch both at once; it only changes window size.
Keep the toolset small. Every extra extension in the profile is one more thing that can alter headers or block a redirect, which is exactly what you do not want when tracing.
Extensions mentioned in this guide
- SAML-tracerTraces SAML messages in browser requests for debugging single sign-on
- Cookie-EditorView, edit, create, and delete browser cookies for any site right from the toolbar
- Clear CacheClear cache and cookies in one click.
- EditThisCookie V3Add, edit, search, protect, and block cookies with the classic EditThisCookie toolset.
- JSON FormatterPretty-print JSON right in the browser.
- User-Agent SwitcherSpoof and mimic browser user-agent strings on any site with one click
- Window ResizerSnap the browser window to preset or custom sizes for side-by-side viewing.
Frequently asked
What is SAML-tracer?
SAML-tracer is a browser extension that records the HTTP requests of a login and decodes any SAML request or response it finds. It is used by IT admins and developers to debug single sign-on.
Is there a SAML-tracer extension for Chrome?
Yes. It began as a Firefox add-on and has a Chrome version you can install from the Chrome Web Store. The source and issues are on the project's GitHub page.
How do I decode a SAML response in the browser?
Open SAML-tracer, run the login, then click the entry flagged SAML and open the SAML tab. The base64 payload is shown as readable XML with no copy-and-paste into a website.
Why does SAML-tracer not show any SAML messages?
It was probably opened after the login started, or the flow never reached SAML. Clear the list, reopen the tracer first, and use a fresh session so the identity provider does not skip the login.
How do I use SAML-tracer in incognito mode?
Go to chrome://extensions, open Details for SAML-tracer and switch on Allow in Incognito. Then open a private window, launch the tracer and sign in.
What does an audience mismatch mean in a SAML error?
The Audience in the assertion does not equal the entity ID configured in the application. Copy the value from the decoded response and compare it character by character with the app's SSO settings.
Why does my SAML login fail only sometimes?
Time-related conditions are a common cause. If clocks differ between the identity provider and the app, NotBefore or NotOnOrAfter can fall outside the valid window on some attempts.
What is the ACS URL and why does it matter?
The assertion consumer service URL is where the app receives the SAML response. The Destination and Recipient in the response must match it exactly, including scheme and trailing slash.
Can SAML-tracer see my password?
It records requests, and a login form submitted to a page the tracer is watching can include credentials. Avoid exporting or sharing a trace that includes the password step, and redact before sending.
Is it safe to paste a SAML response into an online decoder?
It is better not to. A live assertion contains user data and may still be valid. Decode it locally with the tracer or a command-line tool you control.
What is RelayState in SAML?
RelayState is a value the app sends to the identity provider and receives back, so it can return you to the page you started from. If it is lost, you land on a default page after login.
Can I debug SAML with Chrome DevTools alone?
Partly. The Network tab with Preserve log shows every redirect and the raw base64 SAMLResponse, but it does not decode it. A tracer extension saves you the manual decoding step.