Forum Discussion
How to disable page edit button using power automate?
ganeshsanap's Power Automate option is probably the best if you want the automation.
If you are following content management protocol for business content structre and security, you should consider defining the users by the "role" they play in the site. To do this you create a SharePoint group for each role (i.e. Author, Editor, Approver, Consumer, etc.) and define what permissions each role has to each element of the site (the site itself and each list/library within).
Finally you just add the users to a the SharePoint Group that defines their role. They will automatically be assigned the correct permissions withint the entire site, no Power Automate flow required. You can have Power Automate that change their role via forms, data, etc as per ganeshsanap procedure, but remember rights to content is based on roles not people. Major rule of content management is "people change, roles remain."
If they change roles, you just assign them to their new role and remove them from the old one if necessary (again by Power automate if you wish), the permissions and ability of the user will immediately change. In addition, you can have one person fulfilling multiple roles.