The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
LegacyAuthProtocolsEnabled is not sufficient. You need the setting AllowLegacyBrowserAuthProtocolsEnabledSetting. Please note that the spelling in the documentation is incorrect (the prefix “Allow” and the suffix “Setting” are missing in the documentation).
This worked for us:
Set-SPOTenant -AllowLegacyBrowserAuthProtocolsEnabledSetting $true
This may not work after October 15th 2025, see https://cdm.iamcloud.info/docs/Content/RevertChange.htm
Related link: https://mc.merill.net/message/MC1097272