Loading...

Automating M365 login with MFA in Playwright tests

Automating M365 login with MFA in Playwright tests
I have been using Playwright to automate my tests for a long time, but one thing I struggled with was automating the login flow for Microsoft 365 with a multi-factor authentication (MFA) account. When using an MFA-enabled account, you must provide an additional manual step to complete the login process.

Published on:

Learn more
Elio Struyf - Office Development MVP
Elio Struyf - Office Development MVP

Microsoft 365 / SharePoint / Search / Development / Branding / Speaker / Blogger

Share post:

Related posts

Dynamics 365 Business Central: Set up access to Business Central with Microsoft 365 licenses within BC (Not in Admin Center)

Hi, Readers.From Business Central 2022 wave 2 (BC21), Microsoft brought us an exciting news for Business Central. Microsoft Teams users will b...

9 hours ago

Microsoft 365 & Power Platform Community Call – February 26th, 2026 – Screenshot Summary

Call Highlights   SharePoint Quicklinks: Primary PnP Website: https://aka.ms/m365pnp Documentation & Guidance SharePoint Dev Videos Issues...

18 hours ago

Defender for Office 365 URL click alerts now include Microsoft Teams

Microsoft Defender for Office 365 URL click alerts will now include Microsoft Teams, enabling detection of malicious link clicks in Teams mess...

22 hours ago

Microsoft 365 Copilot: Turn Copilot Pages into SharePoint News posts

Microsoft 365 Copilot will enable users to transfer content from Copilot Pages directly into SharePoint News posts for seamless editing and pu...

22 hours ago

Microsoft 365 Copilot: Audio recap language expansion in Microsoft Teams

Microsoft Teams Audio Recap will support eight additional languages starting March 2026, available on all major clients for users with a Micro...

22 hours ago

SharePoint: Backend migration for Weather, World Clock, and Events web parts

SharePoint’s Weather, World Clock, and Events web parts will switch from Bing Maps to Azure Maps backend by late April 2026. This automatic mi...

22 hours ago

Extending Protection for Confidential SharePoint Online Files

Sensitivity labels offer great protection against unauthorized access, but sometimes files that aren't encrypted escape from a document librar...

1 day ago

SharePoint Framework (SPFx) roadmap update – February 2026

We move towards spring 2026 with strong momentum across the SharePoint Framework and an increasing sense of excitement across the ecosystem. S...

1 day ago

SharePoint Framework (SPFx) roadmap update – February 2026

We move towards spring 2026 with strong momentum across the SharePoint Framework and an increasing sense of excitement across the ecosystem. S...

1 day ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy