oauth2 refresh token error

Moderator: crythias

Post Reply
hermawan
Znuny newbie
Posts: 30
Joined: 12 Apr 2017, 12:10
Znuny Version: 6.4.5
Real Name: Hermawan Al-Faruq

oauth2 refresh token error

Post by hermawan »

hi there,

currently we already using oauth2 authentication type for fetching our mailbox (IMAPTLS)
but lil bit confused about token status column that always show
  • Last token request failed.
  • Last(Refresh) token request failed.
as shown below

Image

and when i click for request new token its always show errors like this

Image

with detailed error :

Code: Select all

Backend ERROR: OTRS-CGI-23 Perl: 5.30.0 OS: linux Time: Mon Feb 27 20:19:26 2023

 Message: Error requesting token for token config ID 3 with authorization code 'XXXXXXXXXX RANDOM TOKEN XXXXXXXXXX'. Error: invalid_request

 RemoteAddress: xxxxxxx
 RequestURI: /otrs/get-oauth2-token-by-authorization-code.pl?code=XXXXXXXXXX RANDOM TOKEN XXXXXXXXXX&state=TokenConfigID3&session_state=XXXXXXXXXXXXXXXXXXXX

 Traceback (2522383): 
   Module: Kernel::Output::HTML::Layout::Error Line: 1038
   Module: Kernel::Output::HTML::Layout::ErrorScreen Line: 1019
   Module: Kernel::Modules::AdminOAuth2TokenManagement::_RequestTokenByAuthorizationCode Line: 120
   Module: Kernel::Modules::AdminOAuth2TokenManagement::Run Line: 53
   Module: Kernel::System::Web::InterfaceAgent::Run Line: 1144
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_get_2doauth2_2dtoken_2dby_2dauthorization_2dcode_2epl::handler Line: 52
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32
but fetching mail still works until several (random) time, and we need to remove and re add the new oauth2 configuration token entry to make this working again, what's wrong or step that may i miss? :( :(

any help will be appreciate.

Thank you
---
ati ati kepatil memiaw :D
hermawan
Znuny newbie
Posts: 30
Joined: 12 Apr 2017, 12:10
Znuny Version: 6.4.5
Real Name: Hermawan Al-Faruq

Re: oauth2 refresh token error

Post by hermawan »

anyone ?
---
ati ati kepatil memiaw :D
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: oauth2 refresh token error

Post by root »

Hi,

A little bit more details would help. Which email provider? If it's google check viewtopic.php?f=62&t=43536&p=176683#p176683

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
hermawan
Znuny newbie
Posts: 30
Joined: 12 Apr 2017, 12:10
Znuny Version: 6.4.5
Real Name: Hermawan Al-Faruq

Re: oauth2 refresh token error

Post by hermawan »

root wrote: 19 Mar 2023, 18:14 Hi,

A little bit more details would help. Which email provider? If it's google check viewtopic.php?f=62&t=43536&p=176683#p176683

- Roy
hi root, its using office365, sory im forgot to write it down on details, any sugestion ?
---
ati ati kepatil memiaw :D
hermawan
Znuny newbie
Posts: 30
Joined: 12 Apr 2017, 12:10
Znuny Version: 6.4.5
Real Name: Hermawan Al-Faruq

Re: oauth2 refresh token error

Post by hermawan »

up and up
---
ati ati kepatil memiaw :D
hermawan
Znuny newbie
Posts: 30
Joined: 12 Apr 2017, 12:10
Znuny Version: 6.4.5
Real Name: Hermawan Al-Faruq

Re: oauth2 refresh token error

Post by hermawan »

up and up
---
ati ati kepatil memiaw :D
Post Reply