Authenticate a Azure Automation script with MFA

%3CLINGO-SUB%20id%3D%22lingo-sub-1224213%22%20slang%3D%22en-US%22%3EAuthenticate%20a%20Azure%20Automation%20script%20with%20MFA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1224213%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Community.%3C%2FP%3E%3CP%3EI%20got%20a%20Powershell%20job%20running%20with%20Azure%20Automation%20that%20authenticates%20to%20Sharepoint.%20Now%20what%20happened%20is%20there%20is%20a%20policy%20to%20enforce%20MFA%20on%20all%20authentications.%20This%20means%20that%20the%20Job%20is%20interupted%20due%20to%20MFA.%20Do%20you%20guys%20have%20any%20idea%20of%20how%20i%20could%20run%20a%20powershell%20script%20through%20Power%20Automate%20that%20doesn't%20req%20MFA%3F%20Is%20there%20any%20special%20service%20for%20this%20kind%20of%20tasks%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%2FElias%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1224213%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Automation%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1308563%22%20slang%3D%22en-US%22%3ERe%3A%20Authenticate%20a%20Azure%20Automation%20script%20with%20MFA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1308563%22%20slang%3D%22en-US%22%3E%3CP%3ESame%20here%2C%20got%20a%20script%20running%20a%20few%20times%20a%20day%20from%20within%20the%20windows%20task%20scheduler%20that%20connects%20to%20o365%20using%20modern%20authentication..%20MFA%20is%20in%20the%20way..%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello Community.

I got a Powershell job running with Azure Automation that authenticates to Sharepoint. Now what happened is there is a policy to enforce MFA on all authentications. This means that the Job is interupted due to MFA. Do you guys have any idea of how i could run a powershell script through Power Automate that doesn't req MFA? Is there any special service for this kind of tasks?

/Elias

1 Reply

Same here, got a script running a few times a day from within the windows task scheduler that connects to o365 using modern authentication.. MFA is in the way..