Impersonate a user using the Microsoft Dynamics Web API in Dynamics CRM 2016

A must read post on CRM 2016 ..

Debajit's Dynamic CRM Blog

I have been exploring the Dynamics CRM Web API features and frankly speaking it never ceases to amaze me. So today I am going to explain how you can impersonate a user to create a record from the client side. Wondering how can we impersonate from the client side. After all, till this time, plugins were the privileged objects to do something in impersonation. Well, then Web API has come to shatter many establishments in the CRM society.

I have two users in my CRM system. System Administrator and my account.

image

I am going to login with the System Administrator account and then create an account on behalf of my account (Debajit Dutta).

Below is the code to do the same.

Let me explain the code a bit here. Here I am creating a account named “Sample Account – Impersonation Test”. However I am creating the record under impersonation. The…

View original post 206 more words

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s