Error occurred when verifying security for the message in CRM On-line

1k Views Asked by At

I'm moving out some of the code from a plugin to an external web application. The only thing that needs to be added is the authorization. When executing my QueryExpression instance from within the plugin, that's not an issue. However, accessing the date from outside is. :)

I'm not sure where to provide the credentials (user name and password) so the endpoint at my CRM organization lets me in.

I prefer to resolve it in such a way so I can create a web service reference and work towards it directly. So, the (kind of) requirement is not to go using and creating proxy.

How can I do that?!

Here's the very basic scenario I'd like to effectuate. I've created a web service reference in VS using the wizard (endpoint address is Organization.svc).

QueryExpression request = new QueryExpression
{
  EntityName = "account",
  ColumnSet = new ColumnSet()
};

OrganizationServiceClient client = new OrganizationServiceClient();
IEnumerable<Entity> response = client.RetrieveMultiple(request).Entities;
int entityCount = response.Count();
1

There are 1 best solutions below

6
On BEST ANSWER