Hello to you!

If you have landed on this post its because you are having the following issue in PowerShell: “Connect-SPOService : Identity Client Runtime Library (IDCRL) could not look up the realm information for a federated sign-in.”

I have used the cmdlet “Connect-SPOService” with SharePoint Online Management Shell thousands of times. One day I was attempting to upload a custom theme and I got the following error when trying to connect-spo to my tenant:

There is a possible 3 solutions to this problem:

  1. Make sure you are trying to login with the correct account. As stupid as it sounds my issue was pasting the username without the “.onmicrosoft”
  2. Make sure you are using SharePoint Online Management Shell and not just regular PowerShell
  3. Check if Multi factor Authentication is turned on in this tenant.

I hope this helps fix your issue!!