# Updating environment variables not working

**URL:** <https://community.postman.com/t/updating-environment-variables-not-working/87548>\
**Category:** Help Hub\
**Tags:** variables\
**Created:** [December 16, 2025, 5:17pm UTC](https://community.postman.com/t/updating-environment-variables-not-working/87548 "2025-12-16T17:17:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon-malaret](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@simon-malaret](https://community.postman.com/u/simon-malaret)\
**Post date:** [December 16, 2025, 5:17pm UTC](https://community.postman.com/t/updating-environment-variables-not-working/87548/1 "2025-12-16T17:17:39Z")

</div>

Hello everyone,

I’m experiencing inconsistent behavior when automatically updating environment variables during OAuth 2.0 token refresh.

**The problem:**

- My post-request script updates `access_token` and `refresh_token` after a successful token refresh
- Script logs confirm the values are updated
- Environment UI shows the OLD values (not updated)
- Subsequent token refresh requests fail with `400 - invalid_grant`

**What works:**

- Manually copying values from the response to environment variables → no errors on next refresh
- Same script updating a different environment variable (tested with random endpoint that returns UUID v4, updating a different postman environement) → works perfectly

**My theory:**  
This appears to be environment-specific, possibly related to how OAuth tokens are cached or displayed in the UI? I still struggle to identify what may be preventing values from being automatically updated in my environment, especially since logs seems to indicate that values have been updated correctly (`pm.environement.get()`).

**Questions:**  
Has anyone encountered this? Is there a known issue with programmatically updating token variables in Postman environments?

Screenshots attached below showing the script output vs. UI state.

Thanks so much in advance!

 ![Screenshot 2025-12-16 at 17.55.00](https://us1.discourse-cdn.com/getpostman/original/3X/4/a/4aebdfd26a3a199618ab9aa9b3596d891a76f48a.png)

Request settings

 ![Screenshot 2025-12-16 at 17.53.56](https://us1.discourse-cdn.com/getpostman/original/3X/f/f/ff5ce5c2233830be9b348d39f464e6ef260f67bc.png)

Script

 ![Screenshot 2025-12-16 at 17.55.22](https://us1.discourse-cdn.com/getpostman/original/3X/e/f/efc629534e81241902debca56fe3bc8e50b38950.png)

Request response and script logs

 ![Screenshot 2025-12-16 at 17.55.35](https://us1.discourse-cdn.com/getpostman/original/3X/8/b/8b09f944931dd250d32f6c1eb4fd2e2d5d33c273.png)

Environment values (after request)

---

<div class="post-metadata">

**Author:** ![aviation-saganist-61](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/aviation-saganist-61/32/29312_2.png) [@aviation-saganist-61](https://community.postman.com/u/aviation-saganist-61)\
**Post date:** [December 17, 2025, 5:38am UTC](https://community.postman.com/t/updating-environment-variables-not-working/87548/2 "2025-12-17T05:38:58Z")

</div>

Thanks @simon-malaret for reporting this and for the detailed explanation.

Could you please confirm which Postman app version you’re currently using? If you’re not already on the latest Postman Desktop app ( **v11.76.5** ), could you try upgrading and testing the same workflow again?

I tried reproducing this on my end using the latest version, and the environment variables seem to update correctly for me.

> **[env-variable-bug-reproduce.mov](https://drive.google.com/file/d/1PhB2EJ-QT8BE0c9jOIPdiYjeY7J1M5DR/view?usp=sharing)**
>
> Google Drive file.

If the issue still persists on **v11.76.5** , could you please share the Postman logs (as a zip file)? That would help us dig deeper. You can follow the steps here to collect the logs:  
[https://support.postman.com/hc/en-us/articles/360025298633-How-to-get-logs-from-the-Postman-Desktop-app](https://support.postman.com/hc/en-us/articles/360025298633-How-to-get-logs-from-the-Postman-Desktop-app)

Thanks again for raising this — happy to continue investigating once we have the additional details.

---

<div class="post-metadata">

**Author:** ![simon-malaret](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@simon-malaret](https://community.postman.com/u/simon-malaret)\
**Post date:** [December 17, 2025, 12:27pm UTC](https://community.postman.com/t/updating-environment-variables-not-working/87548/3 "2025-12-17T12:27:32Z")

</div>

Hello Rohan, thanks for investigating!

Updating to the latest version ( **v.11.76.6** ) seemed to have resolved the issue for the refresh token request. I confirm that the environment variables are properly updating.

However, weirdly, the behavior remains unchanged for the create access token request.  
This request shares the same response schema, and has the same post-request script as the refresh token request.

I will dm you the logs so you can investigate!

Thanks again,

Talk soon

---

<div class="post-metadata">

**Author:** ![simon-malaret](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@simon-malaret](https://community.postman.com/u/simon-malaret)\
**Post date:** [December 17, 2025, 12:30pm UTC](https://community.postman.com/t/updating-environment-variables-not-working/87548/4 "2025-12-17T12:30:19Z")

</div>

Should be accessible here : [One time drop | Securely send files with a one-time link](https://onetimedrop.app/#IQkWw7muna8q2EFoiHsONX9aqIGsnQcLld0PSDeABZ01ro3w9CYchxRUZUGKG5cv0AJvDldbf3lVI1yN5fu5us1)

---

<div class="post-metadata">

**Author:** ![aviation-saganist-61](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/aviation-saganist-61/32/29312_2.png) [@aviation-saganist-61](https://community.postman.com/u/aviation-saganist-61)\
**Post date:** [December 17, 2025, 1:01pm UTC](https://community.postman.com/t/updating-environment-variables-not-working/87548/5 "2025-12-17T13:01:16Z")

</div>

Thanks for sharing! The link doesn’t seem to be working for me—could you please check or resend it?

---

<div class="post-metadata">

**Author:** ![simon-malaret](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@simon-malaret](https://community.postman.com/u/simon-malaret)\
**Post date:** [December 17, 2025, 4:17pm UTC](https://community.postman.com/t/updating-environment-variables-not-working/87548/6 "2025-12-17T16:17:53Z")

</div>

Oops sorry about this! This should work: [Postman auth issue logs](https://fromsmash.com/Postman-auth-issue-logs)

---

<div class="post-metadata">

**Author:** ![aviation-saganist-61](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/aviation-saganist-61/32/29312_2.png) [@aviation-saganist-61](https://community.postman.com/u/aviation-saganist-61)\
**Post date:** [December 17, 2025, 5:40pm UTC](https://community.postman.com/t/updating-environment-variables-not-working/87548/7 "2025-12-17T17:40:01Z")

</div>

Thanks for sharing the logs!

Given that the behavior still differs between the refresh token and create access token requests, would you be open to a quick call so we can walk through it together and pinpoint the difference? If that works, please use this link to book a time: [https://calendar.app.google/wCJ4CqUoB7oQkGt79](https://calendar.app.google/wCJ4CqUoB7oQkGt79)

Thanks again!

---

<div class="post-metadata">

**Author:** ![simon-malaret](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@simon-malaret](https://community.postman.com/u/simon-malaret)\
**Post date:** [December 18, 2025, 9:35am UTC](https://community.postman.com/t/updating-environment-variables-not-working/87548/8 "2025-12-18T09:35:01Z")

</div>

Thanks so much Rohan! I’ve scheduled a call!

---

<div class="post-metadata">

**Author:** ![aviation-saganist-61](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/aviation-saganist-61/32/29312_2.png) [@aviation-saganist-61](https://community.postman.com/u/aviation-saganist-61)\
**Post date:** [January 8, 2026, 4:33am UTC](https://community.postman.com/t/updating-environment-variables-not-working/87548/9 "2026-01-08T04:33:34Z")

</div>

Hey @simon-malaret, we’ve pushed fixes to address the issue we discussed on our call in the latest Postman release **v11.79.4**. Could you please update to this version and let us know if it resolves the issue with the create access token request as well?

Appreciate you testing this, and looking forward to your confirmation.
