Diferent Authenticating... to the XRMServiceToolkit

Jun 22, 2015 at 10:43 AM
Hello there,
I need to create a record in a controlled entity.
I don't want to give create permission to "normal" user, just the Administrator will have access (Create) to this entity.

But I need to create records in a html/jscript control that is called by any user...
So, is possible do call the web services from a different Caller Id then the user who is calling the webresource?

in c# I canDo an impersonation, can I do the same using XrmServiceToolKit??
Jun 23, 2015 at 2:23 AM
  • Create a custom action and register run as administrator user.
  • google and you can view a lot of blog post call custom action from javascript
Marked as answer by shpedro on 6/29/2015 at 2:58 AM
Coordinator
Jun 29, 2015 at 10:47 AM
Hi There.

For CRM 2011 and CRM 2013, as I remember the authenication header is ignored in JavaScript, so there is no way you can impersonate the Javascript and run it as another user.

In general, using authentication and impersonation is a bit tricky and has security risks to do.

I agree that action is a better option to do so.

Kind Regards,
Jaimie
Jun 29, 2015 at 10:59 AM
Thanks for the Reply.

I will do just that.