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

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...