The error comes while executing the Get-MsolUser Azure AD PowerShell command to fetch Office 365 users.
Follow the below steps to fix the issue.
Download and install the Microsoft Online Services Sign-In Assistant for IT Professionals RTW from this MSDN URL. The Microsoft Online Services Sign-In Assistant provides end-user sign-in capabilities to Microsoft Online Services, such as Office 365.
Once the installation is over, you can verify in the control panel.
Then Open Windows PowerShell in administrator mode and run the following command.
Install-Module MSOnline -Force
Now you can run the below command,
Once you run the above command, it will ask you to enter the credentials, make sure to enter the global Office 365 admin account.