Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

is it possible to use impersonation using JavaScript?

Posted on by

Hello All Experts,

is it possible to do on MSCRM 2013 on premise?

*This post is locked for comments

  • Suggested answer
    M.T. Eikelenboom Profile Picture
    M.T. Eikelenboom 5,241 on at
    RE: is it possible to use impersonation using JavaScript?

    You can't with pure JavaScript. If you need to impersonate, you need to have some 'server' code to do the impersonation for you (as you can see from the suggestions above). JavaScript is insecure by design and doesn't handle anything with regard to these aspects well.

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: is it possible to use impersonation using JavaScript?

    Hi,

    See the link below.

    social.microsoft.com/.../impersonation-using-javascript-in-ms-crm-2013

    Hope this helps.

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: is it possible to use impersonation using JavaScript?

    Hi,

     you can't in 2013.. You should be able with Web API (2016+).

     What you can do is:

    - Create a plugin or a workflow which runs under a particular user account

    - Use javascript to "kick off" that plugin/workflow (for the plugin, you can, for example, change a field on the form and use Xrm.page... to save the record using javascript. Indirectly, that will start the plugin)

  • Suggested answer
    M.Azwar Alam Profile Picture
    M.Azwar Alam on at
    RE: is it possible to use impersonation using JavaScript?

    Hi, you can try following link

    dynamicscrmcoe.com/crm-2016-impersonating-user-using-javascript-crm-web-api

    Mark answer as verified, if it works for you

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: is it possible to use impersonation using JavaScript?

    What is your exact requirement?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans