# Preauthorization no longer working after upgrading to v2.6

**URL:** <https://hub.mender.io/t/preauthorization-no-longer-working-after-upgrading-to-v2-6/3372>\
**Category:** General Discussions\
**Tags:** upgrade, preauthorization\
**Created:** [March 15, 2021, 5:15pm UTC](https://hub.mender.io/t/preauthorization-no-longer-working-after-upgrading-to-v2-6/3372 "2021-03-15T17:15:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jean-fabien](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jean-fabien](https://hub.mender.io/u/jean-fabien)\
**Post date:** [March 15, 2021, 5:15pm UTC](https://hub.mender.io/t/preauthorization-no-longer-working-after-upgrading-to-v2-6/3372/1 "2021-03-15T17:15:31Z")

</div>

Hi, device preauthorization is no longer working after an upgrade from 2.4 to 2.6.

Full story :

- We have just upgraded our Mender installation as it is documented [here](https://docs.mender.io/2.6/server-installation/upgrading)
- We have experienced some issues with mongodb, they were resolved with this [help](https://forums.rocket.chat/t/solved-trying-to-update-mongodb-from-3-2-to-4-0-in-docker-but-errors/3200/2)
- Strange data was displayed in the UI, everything was okay again after running [deviceauth propagate-inventory](https://hub.mender.io/t/mender-2-5-0-problems-with-filters-hostnames-and-more/2683/2) commands

But one problem is remaining: [device preauthorization API calls](https://docs.mender.io/api/?python#preauthorize) are returning 500 internal errors

We send:

```
{
    "identity_data" : {
        "barcode" : "AB123412341234"
    },
    "pubkey": "-----BEGIN PUBLIC KEY-----\nMIIBojAN...-----END PUBLIC KEY-----"
}

```

We can see this in _menderproduction\_mender-device-auth\_1_ container logs :

```
time="2021-03-15T15:12:53Z" level=error msg="update device status request POST http://mender-workflows-server:8080/api/v1/workflow/update_device_status failed with status 400 Bad Request, response text: {\"error\":\"Missing input parameters: [device_ids]\"}" file=client_orchestrator.go func="orchestrator.(*Client).SubmitUpdateDeviceStatusJob" line=247 request_id=7d0d92d4-7484-4e0f-b030-2961544a6306 user_id=26cd8868-7a66-4b72-acb1-65f0b29fbab0
time="2021-03-15T15:12:53Z" level=info msg="500 4402μs POST /api/management/v2/devauth/devices HTTP/1.1 - PostmanRuntime/7.26.8" byteswritten=103 file=middleware.go func="accesslog.(*AccessLogMiddleware).MiddlewareFunc.func1" line=71 method=POST path=/api/management/v2/devauth/devices qs= request_id=7d0d92d4-7484-4e0f-b030-2961544a6306 responsetime=0.004402464 status=500 ts="2021-03-15 15:12:53.250713544 +0000 UTC" type=http user_id=26cd8868-7a66-4b72-acb1-65f0b29fbab0

```

If we resend a second time, we receive a 409 conflict (device was created the first time without auth set) :

```
{
    "id": "87d5584e-5446-...",
    "id_data": "{\"barcode\":\"AB123412341234\"}",
    "IdDataStruct": {
        "barcode": "AB123412341234"
    },
    "IdDataSha256": "jttlfbu....",
    "decommissioning": false,
    "created_ts": "2021-03-15T14:47:36.502Z",
    "updated_ts": "2021-03-15T14:47:36.502Z",
    "auth_sets": null
}

```

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![alfrunes](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/alfrunes/32/703_2.png) [@alfrunes](https://hub.mender.io/u/alfrunes)\
**Post date:** [March 18, 2021, 3:33pm UTC](https://hub.mender.io/t/preauthorization-no-longer-working-after-upgrading-to-v2-6/3372/2 "2021-03-18T15:33:05Z")

</div>

Hello @jean-fabien

There seems to be an issue where `workflows-server` keeps the old (2.4) definitions in memory.  
Can you try restarting the service?

---

<div class="post-metadata">

**Author:** ![jean-fabien](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jean-fabien](https://hub.mender.io/u/jean-fabien)\
**Post date:** [March 18, 2021, 4:01pm UTC](https://hub.mender.io/t/preauthorization-no-longer-working-after-upgrading-to-v2-6/3372/3 "2021-03-18T16:01:44Z")

</div>

Hi, problem is solved after a restart ! thank you and sorry we just didn’t try it
