Macro for targeting a tanks focus?

Hello there, do you know how to make a macro that selects a tank in a random LFG and then sets their target focus as my focus? So 1. Select tank 2. Target their focus 3. Make their focus my focus

Does someone know how to do this? Thank you for your time.

You can target their target and/or set it as your focus, but your client has no way of knowing what, if any, unit they have set as their focus.

/focus [@targettarget,harm,nodead] []

Is there a way to make a macro that selects the tank in a LFG party? The tank position switched around sometimes in the list.

There’s no native @tank unitid.

No idea if still works but you can try it
https://www.curseforge.com/wow/addons/targetrole