locked
How to impersonate in JavaScript RRS feed

  • Question

  • Hi All,

    I wanna run XrmServiceToolkit.Soap.Fetch() by javaScript.

    My Question is I dont wanna run the query in behalf of the logged-in user, but the user of my choice.

    In short I wanna replace "EXECUTE AS LOGIN = @User" (as in sql) here @user not necessarily on who is logged in, to JavaScript FetchXml request.

    Thanks and Regards,

    Rk_Hirpara

    Wednesday, July 6, 2016 6:54 AM

Answers

  • I can't think of any secure way to do this directly, as you need to supply credentials to login as a different user. One option could be to create a web service that makes the Fetch call, and configure the web service to connect to CRM with a given user account. Then have the javascript function call your web service

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    • Marked as answer by RkHirpara Wednesday, July 6, 2016 1:32 PM
    Wednesday, July 6, 2016 8:22 AM
    Moderator

All replies