Hi everyone,
I'm not sure if this is a general bug or if I made a mistake while migrating from OTRS 6 to Znuny 6.4.5, but I have this issue:
I try to get a OAUTH2 token from Microsoft Azure App for the first time and while I'd expect Microsoft to ask me to sign in or (if I'm already signed) to grant permissions, I receive this error from Microsoft:
Sorry, but we’re having trouble signing you in.
AADSTS900144: The request body must contain the following parameter: 'client_id'.
I double-checked SysConfig for having https enabled, having the FQDN and the ScriptAlias right, also I've double-checked my Azure App und have recreated another one (just to be sure
)
After checking my apache logs I've found error messages in OAUTH2 module that the field "
token_config_id
" is missing in oauth2 table (MySQL).
So I had a look at the database table and - yes - I don't have this table. In my case it is just named "
config_id
".
Another issue I've seen is that I am not able to interact with my already created tokens.
For example while trying do delete them I receive this:
also using the OTRS Kernel modules for interacting with the OAUTH2 tokens are throwing errors regarding the missing field "
token_config_id
".
Is it safe just to rename the field to the value OTRS is trying to address?
Do you have an idea what to do here?
Everything else seems to work fine.
Any help is appreciated, thank you in advance!
I assume, you've skipped some steps on the update.
Please ensure that you went through every step from the
official documentation
, especially going through every minor release (6 -> 6.1 -> 6.2 -> 6.3 -> 6.4), and that you've executed the migration script on every step.
— Emin
thank you for your reply.
I've been following the update process as described in the official documentation.
Anyway - I'm open to repeat the steps.
Is it safe to have a "downgrade"? Or what would be the best way to repeat the steps?
Thank you!
The best thing would be to start over again from a backup.
Could you post the output of this query?
After checking my apache logs I've found error messages in OAUTH2 module that the field "token_config_id" is missing in oauth2 table (MySQL).
So I had a look at the database table and - yes - I don't have this table. In my case it is just named "token_id".
Does that mean you have the table “oauth2_token” but your column is called “token_config_id” instead of “token_id”, or does it mean that your table is called “token_id”? Neither would make sense to me.
The table gets created with the migration script for Znuny 6.3. Maybe you can dig deeper in your web server logs for older error messages – especially from the time of executing the migration script.
— Emin
Hello Pascal,
Just try to change the column manually to token_config_id. I still don't see any hint why that happened, and it's the first time I see this, but that could be enough to get your system going again.
Get sure to delete the cache:
Hi everyone,
altering the column "config_id" to "token_config_id" in oauth2_token table did the job.
I was able to create OAUTH2-Token.
However if I try to fetch Mails with OAUTH2 and IMAPTLS i receive this error now: