web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Question related to executing Plugin with elevated privilege

(0) ShareShare
ReportReport
Posted on by 35

Hello Friends,

I am developing a plugin which dynamically assigns record based on some business rule. The users creating the records do not have Assign privileges. During plugin registration we can specify an impersonating user. Is there a recommended "out-of-the-box" user with elevated privileges I can use (I would like to avoid using a specific named user)

Thanks!

I have the same question (0)
  • Suggested answer
    Torrado Profile Picture
    1,270 on at

    Hello,

    You have two options in terms of Plug-in impersonation:

    • By the Plug-in itself at runtime:
    var factory = (IOrganizationServiceFactory)localContext.ServiceProvider.GetService(typeof(IOrganizationServiceFactory));
    var service = factory.CreateOrganizationService(null);
    • Using the Plug-in Registration Tool (Run In Users context: SYSTEM)

    Hope this helps you.

    Please mark the answer as verified if helpful. That will help others in future.

  • Ugna Undit Profile Picture
    35 on at

    Thanks Torrado! It helped. The System user was tagged "disabled" in the Plugin Registration Tool, but looks like it is functional.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans