Linking Accounts to Accounts to Share Information?

Hi All

I am attempting to build an app where users can share information from their records with other users but can't quite work out a way to make this happen, hoping someone can help with a method.

Basically I have two types of users, lets say "Role A" (Primary) and "Role B" (Secondary). When you create an account as a Primary user you can invite a Secondary user and be linked to them by a form that creates a new user with "Role B" credentials. The problem I have is when you want to invite (and create a user) that already exists.

The idea is Role A users can link to multiple Role B users and visa versa. I have attempted to create a structure that works both using user accounts but also just having one type of user and linking them to user A, user B objects.

Hope this is clear! Would appreciate any work-around.