User Roles are created at design time but are assigned at runtime as part of the startdard Mendix functionality. There could be rare scenario where user roles are so dynamic that they need to be created at runtime. To handle that, you could build your own roles entity and associate that entity will all other entitities. Your access rules at the entity level would then have XPATH expression that would control the access
You can’t create roles at runtime, but you can assign the existing roles you created when building the application to new user you’ve created.
Hope this helps.