Forum Discussion
ashaikh
Mar 16, 2018Copper Contributor
Task Scheduler to connect to Exchange Online Powershell using MFA
I need to schedule a task to run this script below. I am able to run the below script when I am logged on the server, however when I schedule this as a task to run as "Run whether the user is logged ...
Damon Villar
Mar 27, 2019Copper Contributor
I got the same error message when I tried to connect with an MFA enabled account. Is the only solution to run (powershell) scheduled task using an account without MFA enabled.
kathy
Jul 04, 2020Brass Contributor
Microsoft has released EXO V2 preview module for non-interactive PowerShell scripts using Modern authentication/MFA.
https://o365reports.com/2020/07/04/modern-auth-and-unattended-scripts-in-exchange-online-powershell-v2/