I have tried multiple messages on Plugin Registration Tool (PRT) and entities to that my plug-in step would run on Dynamics 365 CE but nothing has worked at so far.
After researching and not founding anything on this for Dynamics 365 it seems there might be an issue preventing this from being done.
Essentially I would like to achieve this on a plug-in because in theory it allows me to execute logic before the message (the security role assignement) is done.
But so far, it seems like it does not work.
Any idea on how to achieve this ?