POWEROBJECTS

718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

When utilizing¬ CRM Portals for Microsoft Dynamics CRM, there are many things you will consider as you begin to implement. How you connect to Dynamics CRM is one of those important decisions.

crm2011

In most typical portal implementations, a service account is used to connect to CRM.  This is the account that reads and writes all needed data to CRM.  This also means that when any record is created or updated through the portal, the records gets stamped with this service account user.  This is typically ok, but there are some cases where we do not want the record being created with the service account user name but with a specific CRM user.

For example, one scenario may be where we are creating opportunities via a portal.  In such a case, perhaps in addition to being owned by a sales person, we want the created by to also reflect this sales person.

This can be achieved by using impersonation.  There are the two steps needed to impersonate in Microsoft Dynamics CRM:

  • The user (impersonator) must have the ActOnBehalfOf privilege or be a member of the PrivUserGroup group in Active Directory
  • Setting the CallerId property of the organization Web service proxy. Please find below a sample code that shows how to set the caller id of the organization service proxy

Impersonate in Microsoft Dynamics Crm

Note: the SystemUser is custom class we created for accessing system user entity fields in crm and CrmService is another custom class we created for creating an instance of organization service proxy

Happy CRM’ing!

Avatar for JoeCRM

JoeCRM

Joe CRM is a CRM superhero who runs on pure Microsoft Dynamics CRM adrenaline. As the face of PowerObjects, Joe CRM’s mission is to reveal innovative ways to use Dynamics CRM and bring the application to more businesses and organizations around the world.