Newman Authentication Error

Archived topic — this may be out of date.
Newman has been replaced by the Postman CLI, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.
Working with an AI coding agent? The Postman plugin lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.

I’m having an authentication issue running Postman tests via Newman.

I’ve created a test suite with variables to populate each environment - long story short, all tests pass when I run them in the Postman app:

Yet, when I run the same collection from Newman (either exported to file or from URL) with the relevant env variables exported, the tests fail (ignore the middle one - it always passes, it’s just to confirm the env under test):

image

So I amended the tests to console.log the response body, and it returns this (from Newman only):

image

Yet, in the Postman app, no authentication is needed…
image

Any ideas?

Thanks,
Adam

Please check in your list of environment Variables, maybe username or password fields you are declared in env variable and getting some variable from Collection variable or global variable and same name variable you left blank in env variable it will create the problem. Plz, verify.