I can easily connect the CRM web api to an on prem installed setup with the following code.
Blackbaud.AppFx.WebAPI.ServiceProxy.AppFxWebService appFxWebService = new Blackbaud.AppFx.WebAPI.ServiceProxy.AppFxWebService
{
Url = "
http://crmdev01/bbappfx/AppFxWebService.asmx",
Credentials = System.Net.CredentialCache.DefaultNetworkCredentials
};
But if I can not figure out how to connect to a hosted environment with SSO.