On Thursday, July 16, 2020 at 10:29:34 AM UTC-7 Vinitha Khambadkar wrote:

> Hello Mitchell,
> Thank you for the response.
> NOTE:  *via Reply privately to author* is grayed out for me. (please 
> enable that for me as it is enabled in the browser settings)
> Some more info, As i mentioned i am using the same code from 
> https://developers.google.com/google-ads/api/docs/account-management/get-account-hierarchy#c
>  
> to retrieve all accounts info.
> But my issue is this :
>
> There are multiple accounts under my login account. and there are multiple 
> sub-accounts linked to all the accounts. I get all the clients resource 
> name as below:
> *What i get back* :  customers/*M1*/customerClients/C1 ,  
> customers/*M1*/customerClients/p1 
> or  customers/*M1*/customerClients/L1
> *What i expect/need* :  customers/M*1*/customerClients/C1, 
> customers/*C1*/customerClients/p1 
> or  customers/*y2*/customerClients/L1
>
> I need the direct parent customer info and not indirect one which straight 
> links to Login Customer.
>                                 
>
>
> I tried the below:
> 1)  giving a where clause to const string query = @"SELECT
>                                     customer_client.client_customer,
>                                     customer_client.level,
>                                     customer_client.manager,
>                                     customer_client.descriptive_name,
>                                     customer_client.currency_code,
>                                     customer_client.time_zone,
>                                     customer_client.id,
>                                     customer_client.resource_name
>                                 FROM customer_client - resulted in error
> 2)  Tried giving P1 as customerId  
> PagedEnumerable<SearchGoogleAdsResponse, GoogleAdsRow> response =
>                         googleAdsServiceClient.Search(
>                             customerId.ToString(),
>                             query,
>                             pageSize: PAGE_SIZE
>                         ); - resulted in *USER_PERMISSION_DENIED *
>
> Please let me know if you need more info on the issue..
> On Thursday, July 16, 2020 at 7:55:24 AM UTC-7 adsapiforumadvisor wrote:
>
>> Hi Vinitha,
>>
>> Thank you for reaching out. Please see here 
>> <https://developers.google.com/google-ads/api/docs/account-management/get-account-hierarchy#c>
>>  
>> for information on getting the account hierarchy. As it says, it is 
>> necessary to provide the login-customer-id as this will be the starting 
>> point for returning the accounts. The sample code runs recursively to get 
>> the accounts linked to sub-manager accounts as well. If you continue to 
>> have issues with this, please share your client customer ID and complete 
>> detailed request and response logs *via Reply privately to author *so I 
>> can further investigate the issue. You can find information on enabling 
>> logging here 
>> <https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging>
>> .
>>
>> Regards,
>> Mitchell
>> Google Ads API Team
>>
>> ref:_00D1U1174p._5004Q21mPvZ:ref
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/da40633f-a26a-4406-890b-6a6dd074883en%40googlegroups.com.

Reply via email to