In the Disneyland app you go to the area where the tickets are entered and there’s a place to link other people. It works correctly <50% of the time. Slightly more when linking by scanning a MB+.
Our experience is that the best, most reliable ways are either:
Call Disneyland Guest Services and they’ll ask for the account name(s) of the people you are linking. Make sure you know this info if they aren’t present for the call. (I think they asked that each person sign in to their account in real-time, but that might also have only been because I mentioned they were there with us…. to be clear, the CM didn’t ask for sign in info— just that the person be signed in in real-time) We were managing a few things though, so the sign in request might have been related to a different thing. I only mention it so you’ll know it may happen.
At DLR, go to a blue guest services umbrella or City hall, and they’ll link everyone. My son said the few minutes wait in line took longer than the linking. (I wasn’t there for that)