ALREADY_MANAGED_IN_HIERARCHY when accepting ClientManagerLink request

36 views
Skip to first unread message

Steve Wilcox

unread,
Jan 29, 2021, 5:32:18 PM1/29/21
to AdWords API and Google Ads API Forum
Greetings Forum Faithful!

I'm using raw REST requests to do the request/accept account link handshake.

I am creating the link request through customerClientLinks:mutate as status: PENDING.

That is working fine.  When I submit the request, I see a pending request in my manager account in the UI in Google Ads.

The client has OAuthed into our system and I have a valid token with the following scopes based on that OAuth:

https://www.googleapis.com/auth/adwords https://www.googleapis.com/auth/travelpartner

I submit a link request through customerManagerLinks:mutate as status: ACTIVE

In response, I get:
{ "error": { "code": 403, "message": "The caller does not have permission", "status": "PERMISSION_DENIED", "details": [ { "@type": "type.googleapis.com/google.ads.googleads.v5.errors.GoogleAdsFailure", "errors": [ { "errorCode": { "authorizationError": "AUTHORIZATION_ERROR" }, "message": "Authorization of the client failed.", "location": { "fieldPathElements": [ { "fieldName": "operations", "index": "0" } ] } }, { "errorCode": { "managerLinkError": 

"ALREADY_MANAGED_IN_HIERARCHY" }, "message": "Client is already managed in hierarchy.", "location": { "fieldPathElements": [ { "fieldName": "operations", "index": "0" } ] } } ] } ] } }

Which seems to be two errors.  I am able to use the same token to query the client's account normally, and the only connection to our manager account is still in PENDING status. 

If it's important, they have other manager links to different manager accounts.

Thanks in advance!

Google Ads API Forum Advisor Prod

unread,
Feb 1, 2021, 1:00:37 PM2/1/21
to swi...@convoyant.com, adwor...@googlegroups.com

Hi Steve,

Thank you for reaching out. When you issue the call to accept the invitation from the manager account, you are supposed to authenticate with the client customer account and this way you won’t encounter the authorization error. As you were authenticated with the manager account, it automatically detected the client customer account that you extended the invitation to, so the "ALREADY_MANAGED_IN_HIERARCHY" error was thrown. 

Thanks and regards,
Xiaoming, Google Ads API Team
 

Google Logo
Xiaoming
Google Ads API Team
 


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