I'm trying to retrieve some data from a clients CRM server.
The main issue I'm currently facing is that the credentials I can work with have limited permissions to the system. Thus, I cannot use the newer Xrm
classes.
Therefore I've decided to try a more basic approach:
CrmAuthenticationToken token = new CrmAuthenticationToken();
token.OrganizationName = "OrganizationName";
token.AuthenticationType = 0;
Microsoft.Crm.SdkTypeProxy.CrmService service = new Microsoft.Crm.SdkTypeProxy.CrmService();
service.CrmAuthenticationTokenValue = token;
service.Url = "http://serverIp/mscrmservices/2007/crmservice.asmx"; //I've also tried to use <serverIp>/<OrganizationName>
service.Credentials = new NetworkCredential("user", "pass", "domain");
string fetch = @"<fetch mapping='logical'><entity name='account'><attribute name='accountid'></entity></fetch>";
string result = service.Fetch(fetch);
However, I get a generic Server was unable to process the request
with no further information. I've checked the event log on the the CRM server, and found nothing of interest. What could possibly be going on?
I don't know if it's a typo error but you don't close the tag attribute:
<attribute name='accountid' / >