# Getting the Error 401

**URL:** <https://discourse.sensu.io/t/getting-the-error-401/3232>\
**Category:** Sensu Go\
**Created:** [June 12, 2024, 2:09pm UTC](https://discourse.sensu.io/t/getting-the-error-401/3232 "2024-06-12T14:09:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkazmi](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@rkazmi](https://discourse.sensu.io/u/rkazmi)\
**Post date:** [June 12, 2024, 2:09pm UTC](https://discourse.sensu.io/t/getting-the-error-401/3232/1 "2024-06-12T14:09:32Z")

</div>

Question) I am getting the following error

Error: failed to request new refresh token; client returned ‘The server returned the error: 401 Unauthorized’

## Environmental information

Version 6.10

### Operating system information

RHEL

### Package versions

6.10

- See the docs site ([Default file locations — Sensu Go documentation]([https://docs.Sensu](https://docs.Sensu) [Go.org/en/latest/pages/configuration/file\_location.html](http://Go.org/en/latest/pages/configuration/file_location.html))) for all file locations
- For all container-based deployments, please include your full, redacted YAML configuration file

_ **NOTE** _ : When posting log output or code snippets (e.g., JSON, YAML, etc.), please surround your code with three backticks like so:

```auto
Your code goes here

```

For longer code or configuration bits, please enclose your snippet in a **summary block** like this:

> **Summary of your code snippet or config here**
>
> ```auto
> Your code goes inside the triple backticks
> 
> ```

---

<div class="post-metadata">

**Author:** ![dishi-singhal](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/dishi-singhal/32/985_2.png) [@dishi-singhal](https://discourse.sensu.io/u/dishi-singhal)\
**Post date:** [June 17, 2024, 1:16pm UTC](https://discourse.sensu.io/t/getting-the-error-401/3232/2 "2024-06-17T13:16:08Z")

</div>

To resolve the `401 Unauthorized error`, follow these steps:

1. Run the command `sensuctl configure` in your terminal or command prompt.
2. Input your credentials to authenticate with the environment.

By running `sensuctl configure` and providing your credentials, you authenticate yourself to the environment, which should resolve the `401 Unauthorised error` you’re encountering.

---

<div class="post-metadata">

**Author:** ![elfranne](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/elfranne/32/594_2.png) [@elfranne](https://discourse.sensu.io/u/elfranne)\
**Post date:** [June 24, 2024, 9:45am UTC](https://discourse.sensu.io/t/getting-the-error-401/3232/3 "2024-06-24T09:45:25Z")

</div>

This is an feature/bug in 6.10, where tokens have a much shorten lifespan. A more detailed explanation can be found here: [Sensu Go 6.10.0 JWT changes impacting Puppet usage · Issue #1338 · sensu/sensu-puppet · GitHub](https://github.com/sensu/sensu-puppet/issues/1338)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/sensu/original/1X/ad88ecc0d60777fbbb8dad05fe976fca2a4d87b2.jpeg) [@system](https://discourse.sensu.io/u/system)\
**Post date:** [July 24, 2024, 9:46am UTC](https://discourse.sensu.io/t/getting-the-error-401/3232/4 "2024-07-24T09:46:05Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
