Update 0365 client_secret via console or db

  • Used Zammad version: 5.4.1
  • Used Zammad installation type: docker-compose
  • Operating system: Ubuntu 20.04.5 LTS (Focal Fossa)
  • Browser + version: Version 117.0.2045.55 (Official build) (64-bit)

Expected behavior:

  • Change or update client_secret via console or db.

Actual behavior:

  • Zammad configuration only admit O365 authentication, and the certificate is expired, anyone (even administrators) can’t login. Email channel was O365 only, so the reset password options is broken too.

  • Message:
    First thank you for this wonderful product, solved all my needs. As I said above, the secret key of the O365 expired, and I can’t login to update it, so any advice is very welcome.

The notification channel does not support Microsoft 365 SMTP but should be a “normal” SMTP server you provide. If you managed to add this somehow, it’s highly unsupported as of now.

The easiest way to overcome this is to set a password to your admin account:
https://docs.zammad.org/en/latest/admin/console/working-on-users.html#set-password-for-user

That version is outdated, please consider to update.

Thank you MrGeneration.

I considered this too, but how can I enable local users and password authentication?

You are totally right; I was using the smtp that O365 gives. Then idk why am I receiving smtp error.

E, [2023-10-18T15:43:54.177212#1-113280] ERROR -- : Error ID ik7uoo53: Can't use Channel::Driver::Smtp: #<Net::SMTPAuthenticationError: Net::SMTPAuthenticationError>
I, [2023-10-18T16:41:01.590091#1-113340]  INFO -- :   Parameters: {"_"=>"1697668863230", "locale"=>"en-us"}
E, [2023-10-18T16:47:44.499173#1-113120] ERROR -- : 535 5.7.139 Authentication unsuccessful, the user credentials were incorrect. [BY3PR04CA0006.namprd04.prod.outlook.com 2023-10-18T22:47:44.474Z 08DBCFACCF54E700]

I will, after resolve the access issue.

Getting back, is there any way to enable local authentication, via console or db?

You can always use login or email address to login if the user has a local password set. Or are you saying the username and password field have been hidden?

Yes, that’s what try to say, sorry didn’t mention it on original post. Is there any way to change the settings to show the user and password fields on the login screen?

Solved it updating the auth_microsoft_office365 setting, via rails console, using:

Setting.set('auth_microsoft_office365_credentials',{your_o365app_credentials_object})

Thank you MrGeneration for your help anyway.

Just for completness:
You can re-enable the username and password form on the login page by using the following command in a rails console: Setting.set('user_show_password_login', true). Using false will disable it.
Your approach should work as well in your case of course.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.