Exchange Online – Use the new Exchange Online PowerShell module v2 with Modern Authentication with your scripts (preview)
As you know, Microsoft is going to retire the basic authentication for Exchange Online PowerShell during the second half of 2021.