I'm trying to implementat client credential flow with Office365/Exchange and IMAP:
Connect-ExchangeOnline -UserPrincipalName firstname.lastname@example.org
which then prompts me to login to the Exchange account but email@example.com doesn't work for logging in, and when I try firstname.lastname@example.org it logs in but powershell says Admin account chosen for authentication is different from the one provided as parameter during Connect-ExchangeOnline.
I believe the problem might be with my client configuration. They have Exchange in the cloud, but how it handles the users is done locally.
They referred to it as Hybrid mode.
So the problem is email@example.com isn't being recognized so how would I get it to ask for credentials if I just put in firstname.lastname@example.org. When I do that I don't get any message to prompt for login.