1. Connect to Exchange Online PowerShell as shown below

    1. On your local computer, open Windows PowerShell and run the following command.

      $UserCredential = Get-Credential
      

      In the Windows PowerShell Credential Request dialog box, type your work or school account and password, and then click OK.

       
    2. Run the following command.

      $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

       

    3. Run the following command.

      Import-PSSession $Session

  2. Run the following command in Exchange Online PowerShell:

    Set-OrganizationConfig -OAuth2ClientProfileEnabled $true

     

  3. To verify that the change was successful, run the following command in Exchange Online PowerShell:

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