Next Practical Step
Add Cookie Manager, re-run one thread, and correlate the first dynamic token on the response before the first 401.
Fix JMeter 401 and 403 after HTTP(S) recording: Cookie Manager, CSRF correlation, expired tokens, Header Manager scope, and CSV users. Symptom and fixes.
This is one of the most common post-recorder failures (HTTP recorder, best practices).
| Cause | Detail |
|---|---|
| Missing Cookie Manager | Session cookies from Set-Cookie not stored per thread (web test plan) |
| Hard-coded CSRF / viewstate / nonce | Values from the recording are stale (correlation) |
| Hard-coded Bearer / session token | JWT expired; need extract + Header Manager (JWT/OAuth) |
| Header Manager scope wrong | Authorization not applied to the failing sampler |
| Same user / concurrency rules | App rejects parallel sessions for one account |
| Include/exclude left noise out | Login API calls never recorded |
| HTTPS recorder cert issues during capture | Incomplete journey recorded (unknown_ca per best practices) |
\${var} (correlation guide, Regex Extractor Builder).access_token, set header Authorization to Bearer `\${accessToken}` (JWT/OAuth).| Resource | Use when |
|---|---|
| Correlation | Extract dynamic fields |
| Regex Extractor Builder | Draft regex from a response body |
| HTTP recorder | Capture and cleanup |
| JWT / OAuth / SSO | Token APIs |
| API load testing | Assertions and headers |
Recording used your live browser session. Replay is a new session unless cookies and tokens are correlated for each virtual user.
Cookies often cover classic server sessions. CSRF tokens, hidden fields, and Bearer tokens still need extractors.
Yes. Correlate anti-forgery tokens and required headers; match the browser’s security headers when they are mandatory.