# Authorize failed: transient error: authorization request failed

**URL:** <https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013>\
**Category:** General Discussions\
**Created:** [July 11, 2024, 7:19am UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013 "2024-07-11T07:19:54Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahithi](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sahithi](https://hub.mender.io/u/sahithi)\
**Post date:** [July 11, 2024, 7:19am UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/1 "2024-07-11T07:19:54Z")

</div>

We are using hosted mender([https://hosted.mender.io](https://hosted.mender.io)), and setting up the client in Linux VM, while we try to run the mender client we are facing issues.

here is our mender.conf

{  
“HttpsClient”: {“SkipVerify”:true},  
“Security”: {},  
“DeviceTypeFile”: “/var/lib/mender/device\_type”,  
“DBus”: {  
“Enabled”: true  
},  
“UpdateControlMapExpirationTimeSeconds”: 90,  
“UpdateControlMapBootExpirationTimeSeconds”: 45,  
“UpdatePollIntervalSeconds”: 5,  
“InventoryPollIntervalSeconds”: 5,  
“RetryPollIntervalSeconds”: 30,  
“StateScriptRetryIntervalSeconds”: 30,  
“TenantToken”: “”,  
“Servers”: [  
{  
“ServerURL”: “[https://hosted.mender.io](https://hosted.mender.io)”  
}  
]  
}

level=error msg=“Authorize failed: transient error: authorization request failed: transient error: authorization request failed: failed to build authorization request: failed to obtain authorization message data: failed to obtain identity data: failed to call /usr/share/mender/identity/mender-device-identity: fork/exec /usr/share/mender/identity/mender-device-identity: exec format error”  
Jul 11 05:55:57 edgedevice11 mender[791535]: time=“2024-07-11T05:55:57Z” level=info msg=“State transition: authorize [Sync] → authorize-wait [Idle]”

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 11, 2024, 7:21am UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/2 "2024-07-11T07:21:41Z")

</div>

Hi @sahithi,

looking at your error message suggests that the file `/usr/share/mender/identity/mender-device-identity` does not work as required. Please make sure that the script is executable and provides an identity as described here: [Identity | Mender documentation](https://docs.mender.io/client-installation/identity)

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![sahithi](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sahithi](https://hub.mender.io/u/sahithi)\
**Post date:** [July 11, 2024, 11:32am UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/3 "2024-07-11T11:32:50Z")

</div>

Hi,

I have tried executing the script from the device identity.  
My mender-device-identity file looks like

ID={  
MAC=01:0e:3b:1b:2c:9a  
}

and also tried different examples shown in the same document, but still couldn’t find a solution. and also tried from here  
[https://github.com/mendersoftware/mender/blob/4.0.2/support/mender-device-identity](https://github.com/mendersoftware/mender/blob/4.0.2/support/mender-device-identity)

requesting further help.

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 11, 2024, 11:38am UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/4 "2024-07-11T11:38:04Z")

</div>

Hi @sahithi

> [@sahithi](#):
>
> My mender-device-identity file looks like
> 
> ID={  
> MAC=01:0e:3b:1b:2c:9a  
> }

This is not a valid identity script. As pointed out in the documentation, specifically here [Identity | Mender documentation](https://docs.mender.io/client-installation/identity#implement-a-device-identity-executable), the file must be executable (`chmod a+x` on Linux), and must print the identity key-value pairs to standard out.

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![sahithi](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sahithi](https://hub.mender.io/u/sahithi)\
**Post date:** [July 11, 2024, 12:29pm UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/5 "2024-07-11T12:29:52Z")

</div>

Hi @TheYoctoJester ,

was able to give correct script now, and now i am facing issue with auth

time=“2024-07-11T12:36:59Z” level=error msg=“Authorize failed: transient error: authorization request failed: transient error: authorization request failed: (request\_id: ): authentication request rejected server error message: Unauthorized”

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 11, 2024, 12:58pm UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/6 "2024-07-11T12:58:31Z")

</div>

@sahithi depending on the polling interval, it will take a few moments for the device to show up on the dashboard. It will be marked as pending. After you have accepted it, the device authentication succeeds.

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![sahithi](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sahithi](https://hub.mender.io/u/sahithi)\
**Post date:** [July 11, 2024, 1:19pm UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/7 "2024-07-11T13:19:18Z")

</div>

@TheYoctoJester i am actually having the device in the preauth state, the device we create from a dashboard, while running the client in linux VM i am facing the issue. can you guide me if the mender.conf file is correct or, can you guide me through the process.  
{  
“HttpsClient”: {“Certificate”: “/certfolder/device1.crt”,  
“Key”: “/certfolder/device1.key”},  
“Security”: {},  
“DeviceTypeFile”: “/var/lib/mender/device\_type”,  
“DBus”: {  
“Enabled”: true  
},  
“UpdateControlMapExpirationTimeSeconds”: 90,  
“UpdateControlMapBootExpirationTimeSeconds”: 45,  
“UpdatePollIntervalSeconds”: 5,  
“InventoryPollIntervalSeconds”: 5,  
“RetryPollIntervalSeconds”: 30,  
“StateScriptRetryIntervalSeconds”: 30,  
“TenantToken”: “”,  
“Servers”: [  
{  
“ServerURL”: “[https://hosted.mender.io](https://hosted.mender.io)”  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 11, 2024, 1:27pm UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/8 "2024-07-11T13:27:19Z")

</div>

Hi @sahithi,

As far as I can tell you can remove a lot of the configuration items. Something like this is known to work:

```auto
{
    "InventoryPollIntervalSeconds": 5,
    "RetryPollIntervalSeconds": 30,
    "ServerURL": "https://hosted.mender.io",
    "TenantToken": "xxxxxxxxx",
    "UpdatePollIntervalSeconds": 5
}

```

Insert your own `TenantToken` value as described in the documentation:

- log in to [https://hosted.mender.io](https://hosted.mender.io)
- click your email at the top right and then “My organization”
- press the “COPY TO CLIPBOARD”
- assign content of clipboard to `TenantToken`

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![sahithi](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sahithi](https://hub.mender.io/u/sahithi)\
**Post date:** [July 11, 2024, 1:46pm UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/9 "2024-07-11T13:46:41Z")

</div>

@TheYoctoJester after modify i am encountering different error  
level=info msg=“‘UpdateControlMapExpirationTimeSeconds’ is not set in the Mender configuration file. Falling back to the default of 2\*UpdatePollIntervalSeconds”  
Jul 11 13:44:29 edgedevice11 mender[165225]: time=“2024-07-11T13:44:29Z” level=info msg=“‘UpdateControlMapBootExpirationTimeSeconds’ is not set in the Mender configuration file. Falling back to the default of 600 seconds”  
Jul 11 13:44:29 edgedevice11 mender[165225]: time=“2024-07-11T13:44:29Z” level=info msg=“No dual rootfs configuration present”  
Jul 11 13:44:29 edgedevice11 mender[165225]: time=“2024-07-11T13:44:29Z” level=info msg=“State transition: init [none] → init [none]”  
Jul 11 13:44:29 edgedevice11 mender[165225]: time=“2024-07-11T13:44:29Z” level=info msg=“State transition: init [none] → idle [Idle]”  
Jul 11 13:44:29 edgedevice11 mender[165225]: time=“2024-07-11T13:44:29Z” level=info msg=“State transition: idle [Idle] → authorize-wait [Idle]”  
Jul 11 13:44:29 edgedevice11 mender[165225]: time=“2024-07-11T13:44:29Z” level=info msg=“State transition: authorize-wait [Idle] → authorize [Sync]”

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 11, 2024, 1:49pm UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/10 "2024-07-11T13:49:19Z")

</div>

@sahithi as the log clearly says, this is an info message and it falls back to a reasonable default value. No problem.

---

<div class="post-metadata">

**Author:** ![sahithi](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sahithi](https://hub.mender.io/u/sahithi)\
**Post date:** [July 11, 2024, 2:46pm UTC](https://hub.mender.io/t/authorize-failed-transient-error-authorization-request-failed/7013/11 "2024-07-11T14:46:28Z")

</div>

@TheYoctoJester thanks for the help.
