IDCRL error in PowerShell

Fixing “Connect-SPOService : Identity Client Runtime Library (IDCRL) could not look up the realm information for a federated sign-in.” -error

This post describes my super-simple fix to a weird error about “Identity Client Runtime Library (IDCRL)” failing with federated sign-in, when running PowerShell scripts against SharePoint Online.


While running your PowerShell scripts using SharePoint Online Management Shell, you get an error. Your cmdlets fail at connecting to the SharePoint Online with the following (or similar) error message:

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


Despite what the error message says, the error is probably not that much about federation, or any other fancy configuration issue. For me, at the very least, it was rather about the credentials supplied. Double-check them – there’s a fair chance you’ve mistyped your credentials and are trying to log-in to a realm that doesn’t exist.

In my case, I made the classic mistake of writing my username as – even though you should use ! Stupid, I know, but not obvious from the error message. And easy to mess up when just hastily copy-pasting or writing the username for the Nth time… 

What else could you try for fixing the Management Shell login issues?

Using correct username didn’t fix your issue? Huh.

Just for a handy reminder, this is the syntax of the cmdlet:

Connect-SPOService [-Url] <UrlCmdletPipeBind> [[-Credential] <CredentialCmdletPipeBind>]


To be fair, your issue COULD be about missing DLL-files, in which case you’ll probably need to install either the SDK or SPO Management Shell again (you can get the SharePoint Online SDK here, or the SPO Management Shell from here:, but in my case the issue has always been resolved by using the correct username. 🙂

This blog post might also help you out: Getting Connect-MsolService (and other SharePoint Online cmdlets) to work

The following two tabs change content below.

Antti K. Koskela

Solutions Architect / Escalations Engineer at Koskila / Norppandalotti Software / Valo Solutions
Antti Koskela is a proud digital native nomadic millenial full stack developer (is that enough funny buzzwords? That's definitely enough funny buzzwords!), who works as a Solutions Architect for Valo Intranet, the product that will make you fall in love with your intranet. Working with the global partner network, he's responsible for the success of Valo deployments happening all around the world. He's been a developer from 2004 (starting with PHP and Java), and he's been bending and twisting SharePoint into different shapes since MOSS. Nowadays he's not only working on SharePoint, but also on .NET projects, Azure, Office 365 and a lot of other stuff. This is his personal professional (e.g. professional, but definitely personal) blog.

Let me know your thoughts!