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

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Plugin Instances Not Cached Anymore - New Instance Each Execution (Contradicts MS Docs)

(0) ShareShare
ReportReport
Posted on by
Hi everyone,

I've discovered that Dataverse plugin instances are being created new for each execution, which directly contradicts Microsoft's official documentation.
 

The Documentation Says:

 
According to Microsoft's article Develop IPlugin implementations as stateless:
 
"Because the platform caches plug-in class instances, the constructor isn't called for every invocation of plug-in execution."
 

My Test Proves Otherwise:

I created a simple test plugin with a GUID property initialized in the constructor:
public class TestPlugin : IPlugin
{
    private Guid ExecutionContextId { get; } = Guid.NewGuid();
    
    public void Execute(IServiceProvider serviceProvider)
    {
        var tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));
        tracingService.Trace($"ExecutionContextId: {ExecutionContextId}");
    }
}

Test Results:

 

  • Expected: Same GUID in trace logs (proving instance is cached and reused)

  • Actual: Different GUID every time (proving new instance each execution

Environment Details:

 

  • Environment Type: Developer

  • Platform: Dataverse Online

  • Plugin Registration: Sandbox mode, Synchronous

  • Tested: August 2025

  • Test Method: Triggered plugin multiple times via entity update

Why This Matters:

 

This fundamentally changes how we should design plugins. The documentation strongly emphasizes stateless design because of instance caching, but if instances aren't cached anymore, this guidance needs updating.

 

Questions:

 

  1. Has anyone else observed this behavior?

  2. Is this an undocumented change in the platform?

  3. Should we now assume plugins are NOT cached?

  4. Does this behavior differ between Developer/Sandbox/Production environments?




  5.  

This is critical for the community to understand as it affects plugin design patterns and performance considerations.

 

Thanks!

 
 
I have the same question (0)
  • MichaelFP Profile Picture
    1,845 Super User 2025 Season 2 on at
    Plugin Instances Not Cached Anymore - New Instance Each Execution (Contradicts MS Docs)
    Maybe only the trace service is renewed.

    But if you create stateless, this thing doesn't affect your plugins. you will have a problem you try to keep the state of the plugin.

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…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 973 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 366 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 343

Last 30 days Overall leaderboard