# Token can not be saved in database

**URL:** <https://www.dolibarr.org/forum/t/token-can-not-be-saved-in-database/29385>\
**Category:** Installing my Dolibarr\
**Created:** [September 18, 2024, 5:41am UTC](https://www.dolibarr.org/forum/t/token-can-not-be-saved-in-database/29385 "2024-09-18T05:41:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Plows](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/plows/32/5660_2.png) [@Plows](https://www.dolibarr.org/forum/u/Plows)\
**Post date:** [September 18, 2024, 5:41am UTC](https://www.dolibarr.org/forum/t/token-can-not-be-saved-in-database/29385/1 "2024-09-18T05:41:47Z")

</div>

Hi and good morning,  
i upgraded from 19.0.3 to 20.0.0, my microsoft oauth2 token can be created, but can not be saved to the database, has anybody an idea?  
I am still on php 7.4.33

Greetings  
Jason

---

<div class="post-metadata">

**Author:** ![hansem](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/h/7bcc69/32.png) [@hansem](https://www.dolibarr.org/forum/u/hansem)\
**Post date:** [September 18, 2024, 6:29am UTC](https://www.dolibarr.org/forum/t/token-can-not-be-saved-in-database/29385/2 "2024-09-18T06:29:02Z")

</div>

Hi,

there’s an issue on github on this subject

> <https://github.com/Dolibarr/dolibarr/issues/30690>
>
> \### Bug
> 
> After update from v19 to v20 the tokens are not stored in the database …any more. The retrieval of token seems to work fine (green box), but then there is no token stored (see screenshot).
> I use this to send email via the SMTPS library. When sending an email now, I get the error, that there is no token stored, but the email gets send anyway.
> 
> 
> \### Dolibarr Version
> 
> 20.0
> 
> \### Environment PHP
> 
> 8.2.22
> 
> \### Environment Database
> 
> MySQL/MariaDB
> 
> \### Steps to reproduce the behavior and expected behavior
> 
> 1. Open token manager on /admin/oauthlogintokens.php
> 2. Retrieve new token
> 
> \### Attached files
> 
> !\[image\](https://github.com/user-attachments/assets/76919f88-39bd-4412-a922-6665a63af4d2)
