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 / Plugin to Prevent user...
Power Apps
Unanswered

Plugin to Prevent users from deleting records in Dataverse

(0) ShareShare
ReportReport
Posted on by 46

Hi!

 

I've recently run into this article Prevent deletes of projects in a Project environment by creating a Microsoft Dataverse Plugin - Project for the web | Microsoft Learn. Why is this plugin needed? Couldn't we just manage access in Dataverse by changing security roles?

 

In our company we have an app for managing projects (PMIS) made in Power Apps, tables are in Dataverse. Admin of this app tried changing security roles to prevent deletion, but it didn't help. 

 

In my apps I've always restricted deletion by managing security groups. But this article mentions "Project for the Web", "project environment" and our app also uses project "msdyn_project" table (which is not a custom table). So, I am wondering maybe I am missing something and if this table has some exceptions.   

 

I don't have an admin access to the environment of this app, so I don't know all the details about this app. 

I have the same question (0)
  • KhushiMurkya24 Profile Picture
    11 on at

    I think you can create web roles and you can provide the rights to that particular web role,In that case user will not have enough privilege to delete any record

     

    If this was your solution, you can leave a like and accept it as a solution 🙂

  • DDBull Profile Picture
    46 on at

    Sorry, what do you mean by web role? 

  • KhushiMurkya24 Profile Picture
    11 on at

    In Portal Management under security there is option of creating web role, where you assign rights.
    I hope now it is clear?

  • Mahendar Pal Profile Picture
    191 on at

    HI,

     

    There could be different use case to have plugin on the delete , but you are correct if you want to handle it through delete permission you can do that, if user don't have delete permission they won't be able to delete it. If user don't have delete permission and they are still able to delete, please review if they are not part of any team where higher security role (which have delete permission) assigned to team because any member of the team will automatically inherit all permission.

     

    Please share some screenshots if possible.

  • Verified answer
    ivan_apps Profile Picture
    2,187 Moderator on at

    Certainly depends on your use case, but I would agree that you are probably better off using security roles if possible.

     

    One thing security roles can't prevent is other administrators from deleting records. Or perhaps the use case is having scheduled periods of time where deletion is allowed.  A plugin that prevents deletion can prevent even SysAdmins from deleting records. Administrators could disable the plugin and continue on deleting but it's that extra step that may prevent accidents or novice administrators from making mistakes.

     

    Perhaps you have an outage period scheduled every week at a certain time. Instead of modifying roles you could create a plugin that automatically allows deletion of records at a certain period of time at whatever interval you choose. I'm sure there are more use cases out there but it gives you an idea where delete preventing plugins may come in handy.

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard