Connect to Exchange online via powershell

 

Check currently status

Get-OrganizationConfig | Format-Table Name,OAuth* -Auto

 

Enable

Set-OrganizationConfig -OAuth2ClientProfileEnabled $true

 

Disable

Set-OrganizationConfig -OAuth2ClientProfileEnabled $false