Exchange Online Powershell with Service Principal
I'd like to run the exchange online powershell with a service principal. The use case is easy - we're running a background service setting some specific configuration on user mailboxes and don't want to use an admin account for that. It's sad this is not on the graph directly possible but at least make SPNs available for use with Exchange Powershell.
Really need this, I did my best to use service principal everywhere in Azure Automation, but because of Exchange I still need my admin account.
Richard Jones commented
We need this as well, we would like to automate the blacklisting of phishing email addresses and due to MFA this process requires a manual step.
There are some settings I want to monitor for CIS compliance so that I can nudge my admins to keep settings up-to-date. I'd rather have that monitoring run from something like a function app getting data from the Graph API than running Exchange Online powershell commands, but I can live with a scheduled job doing the work. I'd still rather use a service principal for system processes than a "real user."
Now that Basic Auth is being deprecated expecting developers to deal with an auth code flow via a browser and possible MFA is not realistic. We need a client credential grant type that can be used with EXO powershell via a Service Principal..