# Authorization error at the time of running a collection for performance test

**URL:** <https://community.postman.com/t/authorization-error-at-the-time-of-running-a-collection-for-performance-test/49220>\
**Category:** Help Hub\
**Tags:** authentication, performance\
**Created:** [July 5, 2023, 4:31am UTC](https://community.postman.com/t/authorization-error-at-the-time-of-running-a-collection-for-performance-test/49220 "2023-07-05T04:31:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ekrasardar](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@ekrasardar](https://community.postman.com/u/ekrasardar)\
**Post date:** [July 5, 2023, 4:31am UTC](https://community.postman.com/t/authorization-error-at-the-time-of-running-a-collection-for-performance-test/49220/1 "2023-07-05T04:31:39Z")

</div>

I have a collection. In the collection I have multiple request. Authorization is used by bearer token. the token is set in the environment variable. If I run the requests individually its working fine. If I run a Functional collection runner it is also working fine. But when I am running the collection for performance it is getting 401 unauthorized error.

---

<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:** [July 5, 2023, 8:46am UTC](https://community.postman.com/t/authorization-error-at-the-time-of-running-a-collection-for-performance-test/49220/2 "2023-07-05T08:46:52Z")

</div>

How are you running the collection for performance?

---

<div class="post-metadata">

**Author:** ![ekrasardar](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@ekrasardar](https://community.postman.com/u/ekrasardar)\
**Post date:** [July 5, 2023, 9:00am UTC](https://community.postman.com/t/authorization-error-at-the-time-of-running-a-collection-for-performance-test/49220/3 "2023-07-05T09:00:51Z")

</div>

![image](https://us1.discourse-cdn.com/getpostman/original/3X/d/5/d5741aa0661112755a9804b031bff2392cafda44.png)  
This is how I am doing it @michaelderekjones

---

<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:** [July 5, 2023, 9:06am UTC](https://community.postman.com/t/authorization-error-at-the-time-of-running-a-collection-for-performance-test/49220/4 "2023-07-05T09:06:35Z")

</div>

Ah, that’s a new(ish) feature which I haven’t used.

I was wondering if you are selecting the environment for the run, but it looks like its set ok.

It doesn’t look like there are any options that you can miss (so I’m assuming everything is taken from the underlying collections). Therefore I can’t even guess at why the authorization is not being sent.

Do you get any console logs for these requests. To check what was actually sent in a request. To see if its translating any variables, or is it just the authorization that is failing.

---

<div class="post-metadata">

**Author:** ![ekrasardar](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@ekrasardar](https://community.postman.com/u/ekrasardar)\
**Post date:** [July 5, 2023, 10:07am UTC](https://community.postman.com/t/authorization-error-at-the-time-of-running-a-collection-for-performance-test/49220/5 "2023-07-05T10:07:49Z")

</div>

Thanks for your concern.  
I have found out the problem here is that at the time of running the test in performance tab, it can retrieve data from collection variable but can’t access environment variable for Authorization.  
In my collection everywhere environment variable is used. when i change the variable to collection then it is working.  
As this is a new feature which is in development may be thats why this bug remains there.
