Hi EladB,
Thanks for reaching out. Harry here, from the Google Ads Scripts Team.
The
AdsApp.Ad object would only let you retrieve its concerning Campaign and Ad Group entities through the
getCampaign/
getBaseCampaign and
getAdGroup/
getBaseAdGroup methods. To retrieve the current selected account, you can use the
currentAccount method. There is no way to retrieve which account (sub or MCC) a Google Ads entity is included via scripts. Moreover, you may only retrieve sub accounts of an MCC through the
AdsManagerApp.ManagedAccountSelector and not the other way around. The
AdsApp.Account does not offer a get MCC method.
For reference on AdWords AP entity relationships see this
link and this
link for Google Ads API in which both can be relayed to supported entities in Google Ads scripts.
Thanks,
 |
| Harry Cliford Rivera |
| Google Ads Scripts Team |
|
|
| |

ref:_00D1U1174p._5004Q2MhaDv:ref