Hi Aaron, You could use the CustomerService.getCustomers() <https://developers.google.com/adwords/api/docs/reference/v201802/CustomerService#getCustomers> without specifying the clientCustomer Id in the request header. This will return the customerIds of the accounts which are directly accessible by the authenticating user. You can check for the canManageClients <https://developers.google.com/adwords/api/docs/reference/v201802/CustomerService.Customer#canmanageclients> attribute to confirm if the returned account is manager or a client account.
You can also use ManagedCustomerService <https://developers.google.com/adwords/api/docs/reference/v201802/ManagedCustomerService> to get the complete account hierarchy. You may refer to the code sample in Java here <https://developers.google.com/adwords/api/docs/samples/java/account-management#get-the-account-hierarchy-under-the-current-account>. Code samples in other languages can be found here <https://developers.google.com/adwords/api/docs/clientlibraries>. Let me know if you have any other questions. Regards, Bharani, AdWords API Team On Monday, April 3, 2017 at 11:03:14 PM UTC-4, Vikram Tiwari wrote: > > Sample code: > > customerService = adwords_client.GetService( > 'CustomerService', version='v201609') > customers = customerService.getCustomers() > > When I use this, for most accounts I am able to get all the accounts > associated. But recently I got issues with one of the accounts where the > actual accounts are part of manager accounts. > > I found some threads regarding using ManagedCustomerService API to get > such data but did not find any example for the same in Python. Any help? > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/acb85506-105a-47b6-92cf-4b8ec3649fac%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.