Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

Team record ownership, plugin execution account

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a record for a custom entity created by an automated process that sets the owner to a team (prior triggering the _service.create call). 

During the creation process, it triggers a bunch of plug-ins (pre-create, post-create and post-update). What I have found is that the post-update plugin that creates a related record runs under the the first individual user account in the Team that owns the original record. Does anyone know why this is the case and how to avoid it? 

  • Community Member Profile Picture
    on at
    RE: Team record ownership, plugin execution account

    That's my point, it's not running under the triggering/initated user. I have a command line application that adds records to D365, it runs under a CRM Administrator Account. It creates records and assigns them to a team. When the Post Update plugin runs for the newly created record it context.userid is a user account that I am not expected. The user account is a user that has not been with the organisation for almost 2 years.

    I suspect that this is because the record is created and owned by a Team, D365 is grabbing the first person in the team to trigger the Post update plugin which seems odd.

  • Suggested answer
    Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: Team record ownership, plugin execution account

    Hi,

    Post create plugin Run in Context is set to calling user then it will run under the context of triggering/initiated user, What I mean by triggering/initiating user is the user who triggers the event.

    In your case it is a automated process, so I would request you to check the user under which automated process is running.

    What is your end goal requirement?

    You want to run your post create plugin under which user comtext?

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Suggested answer
    Abhishek Dhoriya Profile Picture
    1,013 on at
    RE: Team record ownership, plugin execution account

    Entity Ownership in Microsoft Dynamics CRM 365

    Entity Ownership in Microsoft Dynamics CRM 365 - Interview Questions

    Please mark this Answer as VERIFIED, if you find this video article helpful.

  • CRMJetty Profile Picture
    3,512 on at
    RE: Team record ownership, plugin execution account

    Hi Rodney,

    In regards to your concern, you can refer below link for plugin call in user context/accountability:


    community.dynamics.com/.../d365-v9-x-quick-tip-how-to-run-a-plugin-in-system-user-context
    www.inkeysolutions.com/.../
    docs.microsoft.com/.../tutorial-write-plug-in

    I hope it helps,

    Thanks.

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans