Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

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. 

Categories:
  • Verified answer
    ivan_apps Profile Picture
    2,187 Super User 2025 Season 1 on at
    Re: Plugin to Prevent users from deleting records in Dataverse

    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.

  • Mahendar Pal Profile Picture
    191 on at
    Re: Plugin to Prevent users from deleting records in Dataverse

    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.

  • KhushiMurkya24 Profile Picture
    11 on at
    Re: Plugin to Prevent users from deleting records in Dataverse

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

  • DDBull Profile Picture
    46 on at
    Re: Plugin to Prevent users from deleting records in Dataverse

    Sorry, what do you mean by web role? 

  • KhushiMurkya24 Profile Picture
    11 on at
    Re: Plugin to Prevent users from deleting records in Dataverse

    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 🙂

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 - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 19

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 15 Super User 2025 Season 1

Overall leaderboard

Featured topics