I am trying to not use the XRM dlls coming with SDK. So my try is to use pure WCF calls to CRM Online 2013.
Please note that I am not trying to use XRM dlls, so all methods present such as CrmConnection, OrganizationServiceProxy or DiscoveryServiceProxy are not available to me. I tried the same code in CRM 2011 in premise, it works there.
Error details: An error occurred when verifying security for the message
Below are my code:
string strURI = @"https://wwwwww.crm4.dynamics.com/XRMServices/2011/Organization.svc";
OrganizationServiceClient orgProxy = new OrganizationServiceClient();
orgProxy.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential("xxx@yyy.onmicrosoft.com", "xxxxxx");
System.ServiceModel.EndpointAddress myEndpointAdd = new System.ServiceModel.EndpointAddress(new Uri(strURI), System.ServiceModel.EndpointIdentity.CreateDnsIdentity(""));
orgProxy.Endpoint.Address = myEndpointAdd;
Entity objAcc = new Entity();
objAcc.LogicalName = "account";
Crm.AttributeCollection _att = new Crm.AttributeCollection();
_att.Add(new KeyValuePair<string, object>("name", "from XRM code"));
_att.Add(new KeyValuePair<string, object>("accountnumber", "0101010"));
objAcc.Attributes = _att;
orgProxy.Create(objAcc);
So is it possible to authenticate CRM 2013 online with office 365 users with pure WCF calls? Or we must have to XRM dlls?
regards joon