Discourse v2.2.0.beta7 +63 version discourse-azure-ad plugin error

AI-generated summary

In a support thread about Discourse v2.2.0.beta7 +63, Subham_Joshi reports an error with the discourse-azure-ad plugin during Docker setup, which previously worked. david quickly pushes a fix, and Subham_Joshi confirms the plugin now installs successfully. However, a new authentication error appears: “Sorry, there was an error authorizing your account. Perhaps you did not approve authorization?” with invalid_credentials in the URL. david asks whether the issue started after the update or was always present. Subham_Joshi confirms credentials are correct (verified via Azure portal) and asks if other factors could trigger the error. david suggests the error likely originates from Azure and recommends testing with intentionally wrong credentials to reproduce it. Subham_Joshi reiterates credentials are correct and seeks alternative causes. david notes the error comes from Azure and can’t identify other triggers. Subham_Joshi thanks david and plans to investigate further.

I am getting an error regarding the discourse-azure-ad plugin in the new discourse v2.2.0.beta7 +63 version hosted on docker.

In the older version it used to work.
Is there a way to fix this error (other than removing the plugin)

Error - FAILED
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 436 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
4a2a673415d20dcc46c2427329592c0dbd029dbe7aa61e8d6257054f38f56c12

Thanks for reporting - I just pushed an update

https://github.com/discourse/discourse-azure-ad/commit/f3582c208acd342a5725b9e84260dd231637768f

Can you try rebuilding again?

Yes , Its working now.
Thanks for the quick reply.
One more thing, i am getting this error - Sorry, there was an error authorizing your account. Perhaps you did not approve authorization?

**weburl -** 
discourse_domain/auth/failuremessage=invalid_credentials&origin=https%3A%2F%2F**discourse_domain**%2Fauth%2Fazure_oauth2%2Fcallback%3Fcode%3DAQABAAIAAAC5una0EUFgTIF8ElaxtWjTbUplINSR2r1Qd57VQdCjkd45xWvhu4k6ii7Y_XQFjuCrunreUV29xdLL0ULDoR8vPBlBJKmTufkKC3x8gE1hMR7TuB2NeKrBT-oLMDcG08bAziy-B17mzT6i1xX32E3rVCDOA6ZCeQ-OJN1jJvvUVvmmS7flktPmNIcCB5cmWLoH4oaCHeM5WELcl4DalIaYqw5VGfmo0kNHgqqi7BvvVSHFAjjPjDMRHYJ-zwY7AzVgi8VDrN2UVKkwhN281z0dS9SOfTgwUXHa_z0X-YbSRsArfW6PgbNRKf4Ety9mKsqvgJgc-56oARGuBPK5UPvlED4uIYf_6yP667D9hxWru2h8Vp7R304JZUUFb7vRJDy6i7CIigvZl898QgXHdzUX3jbRkb2SgAg2NvLDebvvGzwP41QplagT-8UYJb0_hUoJOP25zr_gsuZnNJRH-zJQYLd0O9SCH1oDv_aNZgwrTsEoSe-A4ltZbcmojM1pYGQV-RktmK-9ZqKv4Xj22n5R1326D_-f7Bkas2_tyzJDpIf83CMrwQO9jBxW4ZR-2A6SAZD6IWJmE0SCgfIWv425IAA%26state%3D420e2bcd209a3d2d8dee9ab41f4bfe5287436db89da240bb%26session_state%3D1f0ba06e-fdd4-4cbe-b758-691d006q8ce3&strategy=azure_oauth2

What could be the issue.?
Can you please elaborate that?

Did this stop working with the recent update? Or have you never got it working before?

Yes, but the credentials are correct. i tried logged into azure portal and it works.
Is there any other way which trigger that error.

I think it just means the credentials are wrong when logging into azure… Try entering your username/password incorrectly and see if you can reproduce the error consistently.

Its strange, credentials are correct i had checked.
Is there any other scenario which trigger that error.

It’s an error coming from the Azure end, so I’m not sure what else could cause it

Okay, Thanks for the help @david .
Will check that.