I tried this:
- performed a psql backup from a working instance
- started a new zammad instance on the same server, different docker stack
- imported psql backup to the new instance
the new instance is working well, but the MS365 channel. OAUTH2 error in existing IMAP connection, and error 500 if I try to reconnect it to 365.
scheduler is reporting:
lib/background_services/service/process_scheduled_jobs/manager.rb:72:in `block in start'
E, [2025-02-28T19:09:56.242499#1-184180] ERROR -- : Can't use Channel::Driver::Imap: #<RuntimeError: Failed to refresh XOAUTH2 access_token of provider 'microsoft365': Request failed! (code: 0)>
E, [2025-02-28T19:09:56.242619#1-184180] ERROR -- : Failed to refresh XOAUTH2 access_token of provider 'microsoft365': Request failed! (code: 0) (RuntimeError)
app/models/channel.rb:370:in `rescue in refresh_xoauth2!'
app/models/channel.rb:355:in `refresh_xoauth2!'
app/models/channel.rb:58:in `fetch'
app/models/channel.rb:36:in `fetch'
(eval):1:in `eval_job_method'
reauthenticating reports error 500 and rails logs
I, [2025-02-28T19:14:45.588903#1-185500] INFO – : Processing by ExternalCredentialsController#callback as HTML
I, [2025-02-28T19:14:45.589126#1-185500] INFO – : Parameters: {“code”=>“[FILTERED]”, “session_state”=>“0022d229-b2a1-9881-dffe-5a571adde942”, “provider”=>“microsoft365”}
E, [2025-02-28T19:14:50.326104#1-185500] ERROR – : Request failed! (code: 0)
E, [2025-02-28T19:14:50.386124#1-185500] ERROR – : Request failed! (code: 0) (RuntimeError)
lib/external_credential/microsoft365.rb:209:in `authorize_tokens’
lib/external_credential/microsoft365.rb:46:in `link_account’
app/models/external_credential.rb:21:in `link_account’
app/controllers/external_credentials_controller.rb:43:in `callback’
app/controllers/application_controller/handles_transitions.rb:16:in `handle_transaction’
I, [2025-02-28T19:14:50.651594#1-185500] INFO – : Completed 500 Internal Server Error in 5058ms (Views: 178.7ms | ActiveRecord: 41.7ms | Allocations: 7604)