Monday, May 9, 2016

Impersonate User in MSCRM 2011/13/15/16

Hi All,

Please find the below c# code to impersonate the user in MSCRM


EntityReference callingUser = new EntityReference
                {
                    LogicalName = "systemuser",
                    Id = {Impersonation User GUID}
                };
OrganizationServiceProxy serviceProxy = (OrganizationServiceProxy)service;
serviceProxy.CallerId = callingUser.Id;


Replace {Impersonation User GUID} with Guid of User to make the Plugin to run as Passing User.

No comments:

Post a Comment

How to Install the Microsoft Dataverse Accelerator in the Dataverse Environment?

  Introduction: In this blog we will see how to Install Microsoft Dataverse Accelerator in Dataverse Environment.   Implementation Steps:   ...