On the On-Premises Exchange server, you need to enable Basic Authentication (See Below)
- Open the Exchange Admin Center and Click on Servers
- Choose the Virtual Directories tab
- Click on Powershell (Default Web Site) or Powershell (Exchange Web Services web site)
- Choose authentication
- Enable “Basic Authentication”