I'm writing MS Dynamics CRM 2011 plugin who is performing manipulations with data on behalf of the system user: changing statuses in required manner, filling administrative information, etc.
I'm using following code to get OrganizationService
running on behalf of the SYSTEM
:
IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService service = factory.CreateOrganizationService(null);
And on development environment everything is running smoothly, but when I deploying assembly on staging environment, for some reason this code is not working anymore. System have chosen one user, let's call him John Doe
and runs actions on behalf of him.
I cannot get why this might happen: both environment are more or less the same, the only difference is the IFD used on staging.
Is it possible to disable user SYSTEM
somewhere in the MS CRM? If yes, where I can find this setting? What else I should check to resolve the issue?
SYSTEM
andINTEGRATION
users are always disabled by CRM, but the impersonation should still work. If you display an unfiltered view of your users, areSYSTEM
andINTEGRATION
both displayed? – Andy Meyers