# Newman does not include header pre-set at collection level

**URL:** <https://community.postman.com/t/newman-does-not-include-header-pre-set-at-collection-level/44277>\
**Category:** Help Hub\
**Tags:** newman-project, authentication\
**Created:** [February 21, 2023, 2:27pm UTC](https://community.postman.com/t/newman-does-not-include-header-pre-set-at-collection-level/44277 "2023-02-21T14:27:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kavippriya2021](https://avatars.discourse-cdn.com/v4/letter/k/76d3ee/32.png) [@kavippriya2021](https://community.postman.com/u/kavippriya2021)\
**Post date:** [February 21, 2023, 2:27pm UTC](https://community.postman.com/t/newman-does-not-include-header-pre-set-at-collection-level/44277/1 "2023-02-21T14:27:07Z")

</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).

**Your question may already have an answer on the community forum. Please search for related topics, and then read through the [guidelines](https://community.postman.com/t/about-the-just-getting-started-category/37) before creating a new topic.**

> Here’s an outline with best practices for making your inquiry.

_My question_:  
the tests that require bearer token in authorization header does not work as expected when run from newman. I have a collection where i am send client credentials in OAuth 2.0 and the generated token as the bearer token in the authorization header. When run from postman it works fine but failing to authorize when run from newman.

_Details (like screenshots)_:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/d/b/db0cc7d3b82f159dd0a4bd97f02a16c09bc635d4.png)

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/3/5/3522d1182adc764d41d68ed25733e7c00ae60a5d.png)

_How I found the problem_:  
While automating one of the client application

_I’ve already tried_:  
Unable to find a work around for this issue

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [February 22, 2023, 9:55am UTC](https://community.postman.com/t/newman-does-not-include-header-pre-set-at-collection-level/44277/2 "2023-02-22T09:55:26Z")

</div>

Where is that token being stored?

If its an environment variable. Are you including the environment json in the Newman command line parameters?

---

<div class="post-metadata">

**Author:** ![mrcarracedo](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@mrcarracedo](https://community.postman.com/u/mrcarracedo)\
**Post date:** [June 15, 2023, 7:14am UTC](https://community.postman.com/t/newman-does-not-include-header-pre-set-at-collection-level/44277/3 "2023-06-15T07:14:26Z")

</div>

Hello. I am facing the same issue or very similar one.  
JWT auth calculates the token ok for Postman, but fails in Newman. Here is the evidence in Postman

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/1/b/1bd4c9e4fd314329e8dbeed28e16206982484738.png)

And the evidence that in Newman execution, the Authorization header is not included  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/a/2/a2257c398125c3b91ff4c735033e0fba81a12da0.png)
