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.
Navin Gupta commented
This feature has been announced as General Availability in Exchange Online PowerShell V2 Module.
Please check - https://aka.ms/exov2-cba
This is absolutely neccessary for Exchange and all other Powershell modules!!
same her but using azure automation runbook
We need this as well
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..