Identity Client Runtime Library (IDCRL) encountered an error while talking to the partner STS

%3CLINGO-SUB%20id%3D%22lingo-sub-828657%22%20slang%3D%22en-US%22%3EIdentity%20Client%20Runtime%20Library%20(IDCRL)%20encountered%20an%20error%20while%20talking%20to%20the%20partner%20STS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-828657%22%20slang%3D%22en-US%22%3E%3CP%3EI%20Installed%20the%20latest%20SharePoint%20Online%20Client%20Components%20SDK%20(%3CA%20href%3D%22http%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D42038%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D42038%3C%2FA%3E).%3C%2FP%3E%3CP%3EI%20created%20a%20web%20form%20application%20referring%20the%20Microsoft.SharePoint.Client.dll%20and%20Microsoft.SharePoint.Client.Runtime.dll.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Evar%20Site%20%3D%20new%20Uri(%22.sharepoint.com%26gt%3B%22)%3B%3CBR%20%2F%3Evar%20login%20%3D%20%22%3CMYUSERID%3E%40%3CMYDOMAIN%3E.com%22%3B%3CBR%20%2F%3Evar%20password%20%3D%20%22%3CMYPASSWORD%3E%22%3B%3CBR%20%2F%3Evar%20securePassword%20%3D%20new%20SecureString()%3B%3CBR%20%2F%3Eforeach%20(char%20c%20in%20password)%3CBR%20%2F%3E%7B%3CBR%20%2F%3EsecurePassword.AppendChar(c)%3B%3CBR%20%2F%3E%7D%3C%2FMYPASSWORD%3E%3C%2FMYDOMAIN%3E%3C%2FMYUSERID%3E%3C%2FP%3E%3CP%3Eusing%20(ClientContext%20clientContext%20%3D%20new%20ClientContext(Site))%3CBR%20%2F%3E%7B%3CBR%20%2F%3Evar%20onlineCredentials%20%3D%20new%20SharePointOnlineCredentials(login%2C%20securePassword)%3B%3CBR%20%2F%3EclientContext.Credentials%20%3D%20onlineCredentials%3B%3CBR%20%2F%3EWeb%20oWeb%3DclientContext.Web%3B%3CBR%20%2F%3EList%20oList%20%3D%20oWeb.Lists.GetByTitle(%22Test%22)%3B%3CBR%20%2F%3EListItemCollection%20items%20%3D%20oList.GetItems(CamlQuery.CreateAllItemsQuery())%3B%3CBR%20%2F%3EclientContext.ExecuteQuery()%3B%3CBR%20%2F%3EclientContext.Load(items)%3B%3CBR%20%2F%3EclientContext.ExecuteQuery()%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20i%20try%20to%20load%20sharepoint%20list%20sometimes%20it%20can%20works%2C%20but%20sometimes%20return%20me%20the%20error%20below%3A%20Identity%20Client%20Runtime%20Library%20(IDCRL)%20encountered%20an%20error%20while%20talking%20to%20the%20partner%20STS.%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20how%20to%20resolve%20the%20problem%2C%20thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

I Installed the latest SharePoint Online Client Components SDK (http://www.microsoft.com/en-us/download/details.aspx?id=42038).

I created a web form application referring the Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll.

 

var Site = new Uri(".sharepoint.com>");
var login = "<myuserid>@<mydomain>.com";
var password = "<mypassword>";
var securePassword = new SecureString();
foreach (char c in password)
{
securePassword.AppendChar(c);
}

using (ClientContext clientContext = new ClientContext(Site))
{
var onlineCredentials = new SharePointOnlineCredentials(login, securePassword);
clientContext.Credentials = onlineCredentials;
Web oWeb=clientContext.Web;
List oList = oWeb.Lists.GetByTitle("Test");
ListItemCollection items = oList.GetItems(CamlQuery.CreateAllItemsQuery());
clientContext.ExecuteQuery();
clientContext.Load(items);
clientContext.ExecuteQuery();
}

 

When i try to load sharepoint list sometimes it can works, but sometimes return me the error below: Identity Client Runtime Library (IDCRL) encountered an error while talking to the partner STS.

Does anyone know how to resolve the problem, thanks.

0 Replies