'Dynamics CRM: Is there a way to impersonate OrganizationData service?

I have some legacy code which for now I want to reuse in rewritten application. This code was used in silverlight, where user credential where available, but now it is supposed to run on server, so I need to impersonate it. Unfortunately, the code uses CRM OrganizationData service (https://crm/OnBoarding/XRMServices/2011/OrganizationData.svc/) and I cannot find any way to turn impersonation on.

Is there a way to do it? I would like to avoid using NTLM.



Solution 1:[1]

After connecting the CrmServiceClient with System Administrator credentials you are able to set the CallerId property to impersonate the user.

CallerId would be the SystemUserId on SystemUser.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Francois Kuyler