Skip to main content

Notifications

Community site session details

Community site session details

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

Virtual entity permission failure

(1) ShareShare
ReportReport
Posted on by 4,702 Super User 2025 Season 1

I am doing some experimentation with Virtual Entities, which is something I haven't touched in a long time, so I am hoping that I am just missing something basic here and someone can Rubber Duck for me...

 

I set up a new VE with R and RM events and registered it in an org I have had for a long time (the plugins are super-basic hello world stubs so there is no chance there is some external failure here). The RM event works fine, but when I go for the R, I get this rather odd permissions failure: 

cchannon_0-1623675599992.png

I am Sysadmin, of course, so my first reaction to this is "what the...?"

 

Then I read more documentation and learn that full CRUD actions are now supported by VEs (nice work, MSFT - I'm gonna use that!) and I realize that when I registered my plugin, I only saw R and RM options. "Aha!" I think to myself, "My org must be out of date only enough to not let me register those events, but current enough that it is checking to see if they are there and hence this 'create privilege' failure." So I kicked off a couple pending base solution upgrades, but being a good impatient developer, I then decide, "why wait?" and I jump over to my personal dev instance which just got spun up last week. Sure enough, when registering this time I get the full complement of CRUD messages and I add in a stub Create message this time that does absolutely nothing; just returns a new Guid.

 

However, no dice. Totally different org, now with a create step, and still I get that same error: 

cchannon_1-1623676077770.png

I'm not seeing it. What am I missing here?

 

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Virtual entity permission failure

    Nice find! Can't believe I messed that one up!

  • Verified answer
    Giorgio Ripamonti Profile Picture
    12 on at
    Re: Virtual entity permission failure

    SOLVED.

    In the retrieve multiple plugin you have to mange the id of your virtual entity. 

    For example:

     

    foreach (var row in products)
    {
    Entity veextrow = new Entity("new_product");
    veextrow["new_productid"] = Guid.NewGuid();
    veextrow["new_name"] = row.name;
    veextrow["new_extsourceid"] = row.id;
    veextrow["new_address"] = row.address;
    veextrow["new_accountid"] = new EntityReference("account", row.customer);
    veextrow["new_startdate"] = DateTime.Parse(row.startdate, cultureInfo);

    //add it to the collection
    results.Entities.Add(veextrow);
    }

    //return the results
    context.OutputParameters["BusinessEntityCollection"] = results;

  • Giorgio Ripamonti Profile Picture
    12 on at
    Re: Virtual entity permission failure

    Hi,

    i'm facing the same issue trying to open a record from a custom Data Provider that call an external API. Retrieve Multiple works well but opening a record i receive the "Create privilege violation encountered" error.

    It seems that D365 try to open the form in create instead of firing Retrieve message and call custom plugin.

    Did you have solved this problem?

     

    Regards. 

  • honzakostejn Profile Picture
    10 on at
    Re: Virtual entity permission failure

    Hi,

     

    I'm having the same issue... I believe the problem is that this should bypass the main operation event since the record can't exist in the database (or at least that's how I interpret virtual entities). I believe it could be something in new client interface that checks for the GUID and if there's one prefilled, but no record exists, it tries to create a new one? Hard to say... Anyway, I can't use this for the implementation.

     

    Other big issue I've come across is exporting connectionDefinitionSecrets. I mean it makes sense that you can't export those, but if you have a custom data source and you want to deploy it with managed solution, you can't input the secret after the deploy, MS is somehow serializing it into JSON and it is not aware of the key (attribute that you've enabled for connection definition secret in metadata).

    I certainly don't suggest everyone using this feature. It's documented very poorly and it doesn't seem to work with custom providers.

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Virtual entity permission failure

    Yeah, I started getting all 5 as soon as I hit the newer org and I see all 5 now that I have updated all base solutions in the older org. In both cases, with or without a create event I get this same error.

    cchannon_0-1623705550680.png

     

  • a33ik Profile Picture
    3,304 Most Valuable Professional on at
    Re: Virtual entity permission failure

    Hello,

    Did you update plugin registration tool? There are 5 dropdowns now on the registration of the datasource.

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

Announcing the Engage with the Community forum!

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 87 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

Overall leaderboard