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 email@example.com – even though you should use firstname.lastname@example.org ! 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 https://www.microsoft.com/en-us/download/details.aspx?id=42038, or the SPO Management Shell from here: https://www.microsoft.com/en-us/download/details.aspx?id=35588), 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
Latest posts by Antti K. Koskela (see all)
- How to fix an Office Group with no Owners - November 14, 2018
- Help! My “Content and Structure” page in SharePoint Online is gone! - November 7, 2018
- Thanks for coming to my session at SPS New England 10/20 ! - October 20, 2018
- Speaking at SPS New England on 10/20! - October 17, 2018