Hi @dehmos27 ,
Unfortunately, we couldn't do it in Power Automate at present. Because the relationship between Contact and WebRole is N:N and there is no way to establish many-to-many relationships in the Flow.
However, you can have a workaround by creating the out of box workflows.
1. Add a custom Text field in Contact entity to store codes
2. Create a workflow, starts when the record is created and the code field is changed.
3. Add a Check Condition step, add some validation mechanisms to newly created code fields
4. Add Portal - Assign Web Role step, choose the web role you want to assign when the condition meets.
assign the web role
Check Condition
Hope this helps.
Sik