# Newman Authentication Error

**URL:** <https://community.postman.com/t/newman-authentication-error/31483>\
**Category:** Help Hub\
**Tags:** newman-project, authentication\
**Created:** [January 12, 2022, 10:05am UTC](https://community.postman.com/t/newman-authentication-error/31483 "2022-01-12T10:05:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamdent](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/adamdent/32/10741_2.png) [@adamdent](https://community.postman.com/u/adamdent)\
**Post date:** [January 12, 2022, 10:05am UTC](https://community.postman.com/t/newman-authentication-error/31483/1 "2022-01-12T10:05:48Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, 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](https://github.com/postmanlabs/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](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

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:

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/6/6688a947c8da1f154499da6f2d2974566daf327e.png)

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](https://us1.discourse-cdn.com/getpostman/original/2X/7/724e53829fd2b10c48f210c8ddd267a199905207.png)

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

![image](https://us1.discourse-cdn.com/getpostman/original/2X/5/502f1aa6daf217560a22690767379bb8152fe755.png)

Yet, in the Postman app, no authentication is needed…  
 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/c/c9513c251e3fd527f0015be4cba37eeac461328b.png)

Any ideas?

Thanks,  
Adam

---

<div class="post-metadata">

**Author:** ![atifkhan5425](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/atifkhan5425/32/29621_2.png) [@atifkhan5425](https://community.postman.com/u/atifkhan5425)\
**Post date:** [July 9, 2022, 10:04pm UTC](https://community.postman.com/t/newman-authentication-error/31483/2 "2022-07-09T22:04:01Z")

</div>

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.
