Hello,
Reproduce again by logout all Azure account. Logout inside from Zammad. Re-open browser.
Once I choose login O365. It will automatic login into Zammad without asking me choose which o365 account.
After clean up all history from browser. It can allow me to choose o365 account to access Zammad again.
Does it a pre-set function? How can avoid auto login for this situation?
Regards,
Machi Ma
This “auto login” feature doesn’t seem to be from Zammad. When having more than one account active (while one being authenticated), it will give me a very short moment where I can see the account selection, it will automatically redirect me back to Zammad authenticated.
This looks like a Microsoft feature which we can’t adjust.
Please note that switching accounts on MS Accounts currently kind of is broken:
opened 09:45AM - 24 Jun 19 UTC
bug
third party issue
authentication
verified
*This post has been edited by @MrGeneration to meet our norm and ensure a good a… nd fast overview of the issue*
### Infos:
* Used Zammad version: 3.0
* Installation method (source, package, ..): package (but affects any installation type)
* Operating system: any (tested on CentOS 7.6.1810)
* Database + version: any
* Elasticsearch version: any
* Browser + version: Tested and verified on Firefox and Google Chrome (both latest)
The full discussion can be found here:
https://community.zammad.org/t/link-up-with-o365-with-error-code-422/2684
### Expected behavior:
When logging in to Zammad via Office365-authentication, no matter on how many accounts you have signed in there, login into Zammad will always work, from any identity selected.
### Actual behavior:
If you're logged in with several Microsoft accounts, as soon as you get to selected the account you want to use, Zammad will fail to authenticate at least one of those accounts.

During testing, the first account being logged in and authenticated against Zammad still worked after logging in into another Microsoft account. This problem seems only to occur if you have two Microsoft Sessions (accounts) on your Browser.
### Steps to reproduce the behavior:
* add thirdparty authentication (Office365) to Zammad
* ensure you're not logged in into any Microsoft-Account
* log out of Zammad
* login via Office365 (in Zammad)
* authenticate against microsoft
* this will work
* log out of Zammad
* go to e.g. office.com and authenticate yourself with a second Microsoft-Account
* go back to Zammad and hit the office365 login button
* you get to choose your desired account, choose the one you just logged into
* this step will fail
* go back to your Zammad login and try it again with the account you used first
* this step will work
Yes I'm sure this is a bug and no feature request or a general question.
### Screenshot of the issue

### related log output
```
I, [2019-06-24T16:41:06.071830 #7878-47156925011520] INFO -- : Started GET "/auth/microsoft_office365" for 666.666.666.666 at 2019-06-24 16:41:06 +0800
I, [2019-06-24T16:41:10.231704 #7877-47073352092880] INFO -- : execute Channel.fetch (try_count 0)...
I, [2019-06-24T16:41:17.397000 #7878-47156923874760] INFO -- : Started GET "/auth/microsoft_office365/callback?code=[FILTERED]&state=08e51a67331f0f0b6a6699bb8ad6c677a4b7cbbdf355d93c&session_state=79248a40-d89f-4d6c-84f3-65f4f6ff0837" for 666.666.666.666 at 2019-06-24 16:41:17 +0800
I, [2019-06-24T16:41:17.892376 #7878-47156925012380] INFO -- : Started GET "/auth/failure?message=invalid_credentials&origin=https%3A%2F%2Fzammad.domain.tld%2F&strategy=microsoft_office365" for 125.215.176.74 at 2019-06-24 16:41:17 +0800
I, [2019-06-24T16:41:17.896828 #7878-47156925012380] INFO -- : Processing by SessionsController#failure_omniauth as HTML
I, [2019-06-24T16:41:17.896945 #7878-47156925012380] INFO -- : Parameters: {"message"=>"invalid_credentials", "origin"=>"https://zammad.domain.tld/", "strategy"=>"microsoft_office365"}
E, [2019-06-24T16:41:17.897342 #7878-47156925012380] ERROR -- : Message from microsoft_office365: invalid_credentials (Exceptions::UnprocessableEntity)
/opt/zammad/app/controllers/sessions_controller.rb:169:in `failure_omniauth'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/abstract_controller/base.rb:186:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.7/lib/active_support/callbacks.rb:131:in `run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_controller/metal/rescue.rb:20:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.7/lib/active_support/notifications.rb:166:in `block in instrument'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.7/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.7/lib/active_support/notifications.rb:166:in `instrument'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.7/lib/active_record/railties/controller_runtime.rb:22:in `process_action'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/abstract_controller/base.rb:124:in `process'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.7/lib/action_view/rendering.rb:30:in `process'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_controller/metal.rb:189:in `dispatch'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_controller/metal.rb:253:in `dispatch'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/routing/route_set.rb:31:in `serve'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/journey/router.rb:33:in `each'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/journey/router.rb:33:in `serve'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/routing/route_set.rb:844:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:192:in `call!'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/strategy.rb:169:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/omniauth-1.9.0/lib/omniauth/builder.rb:64:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rack-2.0.7/lib/rack/etag.rb:25:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rack-2.0.7/lib/rack/conditional_get.rb:25:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rack-2.0.7/lib/rack/head.rb:12:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:232:in `context'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:226:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.7/lib/active_support/callbacks.rb:97:in `run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/callbacks.rb:24:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/railties-5.1.7/lib/rails/rack/logger.rb:36:in `call_app'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/railties-5.1.7/lib/rails/rack/logger.rb:24:in `block in call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.7/lib/active_support/tagged_logging.rb:69:in `block in tagged'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.7/lib/active_support/tagged_logging.rb:26:in `tagged'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.7/lib/active_support/tagged_logging.rb:69:in `tagged'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/railties-5.1.7/lib/rails/rack/logger.rb:24:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/request_id.rb:25:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rack-2.0.7/lib/rack/method_override.rb:22:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rack-2.0.7/lib/rack/runtime.rb:22:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.7/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/executor.rb:12:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/static.rb:125:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/railties-5.1.7/lib/rails/engine.rb:522:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/puma-3.12.1/lib/puma/configuration.rb:227:in `call'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/puma-3.12.1/lib/puma/server.rb:660:in `handle_request'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/puma-3.12.1/lib/puma/server.rb:474:in `process_client'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/puma-3.12.1/lib/puma/server.rb:334:in `block in run'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/puma-3.12.1/lib/puma/thread_pool.rb:135:in `block in spawn_thread'
/opt/zammad/vendor/bundle/ruby/2.4.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
I, [2019-06-24T16:41:17.898076 #7878-47156925012380] INFO -- : Rendering inline template
I, [2019-06-24T16:41:17.898682 #7878-47156925012380] INFO -- : Rendered inline template (0.5ms)
I, [2019-06-24T16:41:17.898830 #7878-47156925012380] INFO -- : Completed 422 Unprocessable Entity in 2ms (Views: 0.9ms | ActiveRecord: 0.0ms)
```
system
Closed
October 31, 2019, 6:14am
4
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.