Related (probably): https://github.com/microsoft/BotBuilder-Samples/issues/1523
I've seen this happen before, too.
4.4.1-60043 (although I'm fairly certain this isn't new)
In order for a change to MicrosoftAppId / MicrosoftAppPassword to take effect in the Emulator, the whole Emulator application must be restarted, not just the opened bot or the "Live Chat" window. I have a feeling this is tied to caching it for an endpoint, but I haven't tested different endpoints.
This can be a problem in the following scenarios:
Get two valid AppIds/AppPasswords. I'll refer to them as AppA/PassA, AppB/PassB.
FAIL:
appsettings.jsonappsettings.jsonSUCCESS:
appsettings.jsonappsettings.jsonOpening a new Bot session in Emulator should not use an old AppId/AppPassword.
I've tested various ways of stopping/restarting the bot and with/without ngrok. Pretty sure this is an Emulator issue.
The completely breaks in C#, presenting the 500 error and then not connecting. In Node, it seems to first try to connect with the old AppId/Pass, but then tries to connect with the new one and works. See image:

Note that when connecting in Emulator, I used 94ea2b04-ccba-437e-b3f1-3f0376fcbc98. It showed the error in console, but actually worked in the Emulator.
[bug]
I've been able to repro this on some scenarios as well. I believe this change will solve the issue.
@mdrichardson try updating to the most recent nightly build and see if the change fixes the issue.
@tonyanziano Still able to repro:


Restarting the Emulator still "fixes" it and I'm using Win+V to paste, so I'm definitely using the same/correct id/pass.
@mdrichardson - Sorry for the late reply. #1597 fixes this issue with your repro steps above. Feel free to test the latest nightly build with your scenario to see if it's been solved. If not, let's plan to meet in person or via teams to solve it.
@justinwilaby Still experiencing this:


I'd be a little surprised if that fixed it, since I can repro this without ngrok.
Let's meet tomorrow in person. Reach out to me on Teams when you're free and I'll pop down--I'm pretty flexible outside of 10-1030am.
@justinwilaby @mdrichardson Did you two end up working this out, or is this still an outstanding issue?
@tonyanziano Still outstanding. I haven't tested this in awhile, though.
Tried to repro on 4.5 and seems to be fixed now.
@tonyanziano Confirmed fix! Good work!