Google ads script, AdsApp.adGroups().get() returning empty
I am developing a google ads script to run and create negative keywords, i get the performance using an SQLreport and when i try to create a negative keyword it does not work because when i try to return existing adgroups and initialize them, i get an empty result.
var adGroups = AdsApp.adGroups().get(); Logger.log('Total adGroups found : ' + adGroups.totalNumEntities());
This returns: Total AdGroups found : 0 -> but i have multiple running ads/adgroups in that sub-account.