Reputation: 3
yesterday I created a new installation of Microsoft CRM Online. Now I'm trying to access the webservice using the sdk provided from Microsoft. When i try to connect to Microsoft CRM Online I get this error:
An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
I read in some posts that it can be the hours difference between my machine and the CRM Online Server, but I've tried running this code unsuccessfully using all the hours.
CrmConnection crmConnection = CrmConnection.Parse("Url=https://desenvolvimento.crm2.dynamics.com/XRMServices/2011/Organization.svc; [email protected]; Password=XXX;");
OrganizationService service = new OrganizationService(crmConnection);
Entity account = new Entity("account");
account["name"] = "Test Account";
account.Id = Guid.NewGuid();
Guid accountId = service.Create(account);
Is it different to connect to CRM Online using 365 credentials? I really can't find the problem, and I've tried many solutions, but none worked. Thanks in advise.
Upvotes: 0
Views: 242
Reputation: 15128
You don't need to put the endpoint inside the connection string when you use the simplified connection, just the organization url.
Assuming your url is correct (meaning you can login using a browser), try with:
CrmConnection crmConnection = CrmConnection.Parse("Url=https://desenvolvimento.crm2.dynamics.com; [email protected]; Password=XXX;");
OrganizationService service = new OrganizationService(crmConnection);
Entity account = new Entity("account");
account["name"] = "Test Account";
Guid accountId = service.Create(account);
Upvotes: 0