You have to use a combination of the CRMD_MKTGS_LINKS table and the SRRELROLES table. It is kind of tricky because it is recursive.
if you use SE16, then do the following
1. SRRELROLES.objkey = TPM GUID
2. CRMD_MKTGS_LINKS.roleb = value of SRRELROLES.RoleID (Use the BRELTYPE = AGTP)
3. SRRELROLES.RoleID = CRMD_MKTGS_LINKS.rolea
4. SRRELROLES.ojbkey = AGR GUID
I'm unable to paste in the code I have for a query, otherwise I would provide you a query.