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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Virtual entity permiss...
Power Apps
Unanswered

Virtual entity permission failure

(1) ShareShare
ReportReport
Posted on by 4,702 Moderator

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?

 

I have the same question (0)
  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

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

  • cchannon Profile Picture
    4,702 Moderator on at

    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

     

  • honzakostejn Profile Picture
    10 on at

    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.

  • Giorgio Ripamonti Profile Picture
    12 on at

    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. 

  • Verified answer
    Giorgio Ripamonti Profile Picture
    12 on at

    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;

  • cchannon Profile Picture
    4,702 Moderator on at

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard