Add Microsoft 365 organization using the Setup Assistant
Required permissions
<AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" /> </AppPermissionRequests>Install-Module -Name Microsoft.Online.SharePoint.PowershellConnect-SPOService https://tenantName-admin.sharepoint.com Set-SPOTenant -LegacyAuthProtocolsEnabled $True Set-SPOTenant -DisableCustomAppAuthentication $false