This Question have 1 answers right now.

SharePointOnlineCredentials throws ComException


I am working with SharePoint online and using Windows Azure to host the process accessing SPO.

We have added a Startup Task to the Azure roles to install . Our first issue was that it would not install because the osFamily was 1 (Server 2008 R2 is a prereq).

We are now seeing this error when trying to instantiate a SharePointOnlineCredentials object.

Application: WaWorkerHost.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Runtime.InteropServices.COMException Stack: Microsoft.SharePoint.Client.Idcrl.ManagedIdcrl.EnsureInited() at Microsoft.SharePoint.Client.Idcrl.ManagedIdcrl.LogonIdentity(System.String, System.Security.SecureString) at Microsoft.SharePoint.Client.SharePointOnlineCredentials..ctor(System.String, System.Security.SecureString)

What could I be doing wrong?

PS. I have got Microsoft.IdentiyModel v3.5 set to Copy local

EDIT: The event log shows the exception before the above exception, the message is below. From what I can tell this is the sign in helper for MS online.

Source MSOIDSVC.EXE. Message: InitializeSvcAPI failed with hr = 0x80048883


I had the same exception. To resolve it :

Connect to in IE with the account that you will use in your app (or app pool) and install the certificate from the page.

It solved my problem.

Hope can help.

By : Iveusse

Video about SharePointOnlineCredentials throws ComException