What trouble do you have. You can retrieve an userrole by doing a retrieve on the entity System.UserRole and constraining on the name. After the retrieve you can associate the role to a system.user.
Thanks. I think I just ended up confusing myself. Encase anyone else is like me: 1. In microflow choose "Retrieve" From Database 2. Entity: System.UserRole 3. Set the range to "First". Xpath: 4. [Name = "<rolename>"]
You can retrieve a user role in a microflow, but you could/should constraint the user role on ID not on NAME. User role names are available as token when you contraint on ID. https://forum.mendix.com/link/questions/89358