I have run the below PnPPowerShell command to connect the SharePoint Online

PS: > $cred = Get-Credential
PS: >  Connect-PnPOnline –Url https://<tenant>.SharePoint.com –Credential $cred

I have received the below error message.

Connect-PnPOnline : Identity Client Runtime Library (IDCRL) could not look up the realm information for a federated sign-in

I just verified the code once again and everything seems fine for me. But it not works.

So, I have re run the code and now the site is connected. How come???

In the code, we have called Get-Credential to ask the coder to enter credentials to connect SharePoint Online. Now, I have entered wrong credentials. Wow, I have received the same error message.

IDCRL Exception

IDCRL Exception

Root Cause:

So, if we received this issue. First, we have to check whether we have entered the correct credentials.


Entering the correct credentials, will solve this issue.

Happy troubleshooting :)