Exchange Online Powershell auto login and unable to login to other tenant-domain

Copper Contributor

So I have admin accounts for two companies.  A main account which my machine is all setup with and our new parent company account.  After turning on MFA for both, my Outlook stopped liking the second account(still haven't figured that out, but that's another story).  So in the process of troubleshooting that, I was getting powershell working with MFA.  Long story short, I got powershell working no problem, however it autologins when I Connect-Exopssession -UserPrincipalName <my UPN here> for my main account which I don't really think is a good thing from a security standpoint, and 2, when I put the UPN from the other tenant/domain in there, it fails with "Bad request for more information" after doing the MFA login.

 

I had installed Microsoft Online Services Sign-In Assistant which I thought could be the culprit, but getting rid of it and restarted did not help.  Any Ideas on how to stop this behavior and make me log in MFA every time instead of passthough and also why it might have broken logging into the other.

 

Once I'm done with that rabbit hole I'm going to try and figure out why Outlook doesn't like the other account(doesn't even come up with the MFA stuff for it), but first things first.

1 Reply

@Cecil C. Achord  This is default behavior when you have SSO with pass through enabled (in Azure AD Connect) and probably your new tenant (which doesn't work to connect with EXO PowerShell) has conditional access policy in azure ad to allow access to azure ad resources via domain joined devices only (which isnt right because you are on your old Company domain joine device . May be ?

 

Ankit Shukla