Cannot link test accounts + Test clients not showing in accounts management

952 views
Skip to first unread message

Ivan

unread,
Sep 7, 2018, 5:17:02 AM9/7/18
to AdWords API and Google Ads API Forum
Hello!

I am trying to make my first API call, so I set up a test manager account and a few test client accounts (i.e. the dummy accounts created under the test manager account). But when running generate_refresh_token.py, I received this:

Error summary: {'faultMessage': "[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'<null>']", 'requestId': '0005753d9c9f13580a3706d12803025d', 'serviceName': 'CampaignService', 'methodName': 'get', 'operations': '1', 'responseTime': '86'}

This made me realize I hadn't actually linked the test manager account to the test client accounts. But when I tried to link them to the test manager account, I received this:

"You can't link this account because it's already linked to another manager in this account hierarchy. If you don't manage this account, please contact your top manager account to change its manager to this manager." Please see attachment.

As stated in the docs, "While logged in to AdWords as your test manager account, any client accounts you create will automatically be test accounts.", so I find it hard to understand that "it's already linked to another manager in this account hierarchy". These are test accounts created under a test manager.

As a side note, I am also having the same minor error described in the links below, namely that test client accounts are not showing where they should. While not fatal, this minor error might be related (or not)


Thanks in advance!

Untitled.png

Teja Makani

unread,
Sep 7, 2018, 3:26:57 PM9/7/18
to AdWords API and Google Ads API Forum
Hello Ivan,

You are right, the AuthorizationError.USER_PERMISSION_DENIED occurs when there is no link between the manager account authenticated in the request and the client account specified in the headers. 

While logged into AdWords as your test manager account, any client accounts you create will automatically be test accounts under that manager only. If you don't see the test accounts under your test MCC account, It could be possible that while creating test accounts you might login as another MCC account user. So, as a precaution you could use incognito window of browser and login with your test MCC account to create test client accounts. If you don't want to create new accounts then you can un link the accounts under that another manager account and link them to your manager account. Alternatively you can link and un link accounts via API using managedCustomerService.mutateLink service, you could refer this guide for more details. Also, you could fetch the list of accounts linked to your manager account by using managedCustomerService.get operation.

If you are still facing issues, please share the MCC Id's of test manager accounts and CID's of test client accounts, you could use reply privately to author option while sharing the details.

Regards,
Sai Teja, AdWords API Team.

Ivan

unread,
Sep 7, 2018, 4:17:41 PM9/7/18
to AdWords API and Google Ads API Forum
Teja, thanks for your help. It's solved now. In case it's useful for someone else, there were two different issues:

1. Yesterday I was in fact logged in to my test manager account when I created the test client accounts (red label displayed, as in attachment), so I am certain I was creating them correctly and still they did not show up in the "Accounts" menu, only in "Overview", and even in "Overview" I could not link them to the test manager account, instead I kept getting the message "You can't link this account because it's already linked to another manager in this account hierarchy." However, I simply tried again today (same test manager, same previously created test client accounts, same menu) and this time they were linked successfully... It's either a bug or there's a set waiting time for linking test accounts.

2. It turns out I that my OAuth credentials were for my production manager account, as I got them while logged in with it, but in fact I needed OAuth credentials for my test manager account, so I got a client ID / secret for the latter and it worked! The documentation says "While logged in with your manager account credentials, open the Google API Console Credentials page." In the interest of clarity, this should read "with your test manager account credentials."

Thanks again!

Teja Makani

unread,
Sep 10, 2018, 2:42:37 PM9/10/18
to AdWords API and Google Ads API Forum
Hello Ivan,

Glad the problem is resolved and thanks for sharing the brief details. Please find my response below.
  1. Ideally, there shouldn't be any delay to linkup a test client account when created through the manager account. You might need to refresh the page, if they are not reflected instantly. If the problem persists even after refreshing the page, you could report it to the AdWords product team through via the help icon in your Google Ads UI. 

  2. Since, The "Set up OAuth2 authentication" section in this guide is generalized for test and production accounts, it does not mention as test manager account specifically. But, we need to determine it based on the accounts(Test/Production) for which we need to generate OAuth2 credentials. 
Let me know if you have any further questions.


Regards,
Sai Teja, AdWords API Team.

James John

unread,
Jul 22, 2019, 3:35:29 AM7/22/19
to AdWords API and Google Ads API Forum
So I am facing same issue this day. I create accounts and they don't show up in Accounts. Only in Overview and when I want to create campaigns.
I am using this for development purpose. When I try query using getCustomer it returns USER_PERMISSION_DENIED
Every other problem is same with the author's. I can't still link them because it says I manage the accounts already.

Google Ads API Forum Advisor Prod

unread,
Jul 22, 2019, 6:27:34 AM7/22/19
to adwor...@googlegroups.com
Hi James,

Thanks for your comment.

To take a closer to the issue, could you provide the customer ID of the manager account where you created those client accounts?

Moving forward to the USER_PERMISSION_DENIED error that you encountered, it indicates that you might be using OAuth2 credentials that does not have access to the (clientCustomerId) account you are authenticating with. To avoid this error, you will need to use the OAuth2 credentials that were generated using an email address which has access to the account indicated in your request header. If the error persists, you may send to me the email address you used to generate the OAuth2 credentials and also the complete SOAP request and response logs so I can further investigate. You may then send your reply using the Reply privately to author option.

Regards,
Ejay
Google Ads API Team

ref:_00D1U1174p._5001UEFyCL:ref

James John

unread,
Jul 22, 2019, 6:45:12 AM7/22/19
to AdWords API and Google Ads API Forum
Hello,
I realized they are under cancelled accounts. I cannot set them active because I can't add billing details to test account.
Same reason I can't see them in API Query as well, it shows permission denied.
I am using the correct OAuth2 credentials. Account ID is 149-411-4678

Thanks

Jérôme Argot

unread,
Jul 31, 2019, 3:46:03 PM7/31/19
to AdWords API and Google Ads API Forum

Hello,


I'm getting a very similar if not the same issue: the tests account I create under my test manager account are created successfully and show up instantly in the dashboard, but as soon as I refresh the page or trigger a UI update, they disappear. I can still see them on the Campaign tab, if I create campaigns, but they still don't show up in my Account tab.


Trying to interact with them through the Ads API v2 is getting me a Permission Denied error as well, and they are not listed in ListAccessibleCustomers.


Happy to share a video capture in private if that helps :)

Thanks

Google Ads API Forum Advisor Prod

unread,
Aug 1, 2019, 12:52:31 AM8/1/19
to adwor...@googlegroups.com
Hi Jerome,

Thanks for raising your concern.

With regard you issue about the created Google Ads account that couldn't find in the Account tab. Since you encountered the issue on the UI, I suggest to reach out the product team via ? icon > Get help link as they are more equipped to provide support about this topic.

Moving forward to the permission denied error that you encountered on Google Ads API, I will raise the issue on my team and rest assured that we will provide updates when available.

Google Ads API Forum Advisor Prod

unread,
Aug 1, 2019, 1:56:56 PM8/1/19
to adwor...@googlegroups.com
Hello Jerome,

Since the test account would be canceled automatically when you created, you might have to turn on the canceled accounts from the accounts view. Follow the instructions mentioned below:
  1. Sign in to your Google Ads manager account.
  2. At the top of the page, click the down arrow next to your manager account name and customer ID.
  3. Click the 3-dot icon  , then check the box next to canceled accounts.
Regarding the permission denier error, to trouble shoot can you please share the client customer id you are using, login customer id and email address of the user using which the OAuth credentials for the call is created along with the complete error log. 

Regards,
Sai Teja, Google Ads API Team
 

ref:_00D1U1174p._5001UEFyCL:ref
Reply all
Reply to author
Forward
0 new messages