When I tried
Connect-PnPOnline –Url https://xxx.sharepoint.com –Credentials (Get-Credential)
It asked me to uninstall all previous versions of “SharePointPnPPowerShellOnline” and install “PnP.PowerShell” like below
Uninstall-Module -Name SharePointPnPPowerShellOnline -AllVersions -Force
Install-Module -Name PnP.PowerShell
Then I again tried
Connect-PnPOnline –Url https://xxx.sharepoint.com –Credentials (Get-Credential)
Connect-PnPOnline : AADSTS65001: The user or administrator has not consented to use the application with ID ‘31359c7f-bd7e-475c-86db-fdb8c937548e’
named ‘PnP Management Shell’. Send an interactive authorization request for this user and resource.