What is CANNOT_UNLINK_ACCOUNT_WITHOUT_ACTIVE_USER and what does it mean?

175 views
Skip to first unread message

axtens

unread,
Sep 15, 2016, 4:09:52 AM9/15/16
to AdWords API Forum
In the course of running
                LinkOperation lo = new LinkOperation();
                lo.@operator = Operator.SET;

                ManagedCustomerLink mcl = new ManagedCustomerLink();
                mcl.managerCustomerId = managerId;
                mcl.clientCustomerId = clientId;
                mcl.linkStatus = LinkStatus.INACTIVE;

                lo.operand = mcl;

                ManagedCustomerService mcs = (ManagedCustomerService)user.GetService(AdWordsService.v201607.ManagedCustomerService);

                ManagedCustomerLink[] mcls = mcs.mutateLink(new LinkOperation[] { lo });


"user" is okay as it's been passed into the method. "managerId" and "clientId" are okay as well and there is a linkage between them. 

The clientCustomerId was generated yesterday by programmatically creating the account. Said account has no budget orders, no shared budgets, no anything other than the account. 

I'm trying to write code to programmatically unlink accounts which were created in error (by other programs.)

The full exception (from the Locals window):
- $exception {"AdWordsApiException: One or more AdWords API errors have occurred. \r\n\r\nUnknown.. (Error: ManagedCustomerServiceError.UNKNOWN, FieldPath: operations[0], Trigger: )\r\n\r\n"} Google.Api.Ads.AdWords.Lib.AdWordsApiException
+ ApiException {Unknown.. (Error: ManagedCustomerServiceError.UNKNOWN, FieldPath: operations[0], Trigger: )} object {Google.Api.Ads.AdWords.v201607.ApiException}
+ Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
HResult -2146233088 int
HelpLink null string
+ InnerException {"[ManagedCustomerServiceError.CANNOT_UNLINK_ACCOUNT_WITHOUT_ACTIVE_USER @ operations[0]]"} System.Exception {System.Web.Services.Protocols.SoapException}
Message "AdWordsApiException: One or more AdWords API errors have occurred. \r\n\r\nUnknown.. (Error: ManagedCustomerServiceError.UNKNOWN, FieldPath: operations[0], Trigger: )\r\n\r\n" string
Source "Google.Ads.Common" string
StackTrace "   at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Object[] parameters)\r\n   at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, Object[] parameters)\r\n   at Google.Api.Ads.AdWords.v201607.ManagedCustomerService.mutateLink(LinkOperation[] operations)\r\n   at WorkFlowMaxTool.AdWords.deactivateClient(AdWordsUser user, Int64 managerId, Int64 clientId) in e:\\sources\\BOWFMT\\WorkFlowMaxTool\\AdWords.cs:line 1099" string
+ TargetSite {System.Object[] MakeApiCall(System.String, System.Object[])} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}


So why the "CANNOT_UNLINK_ACCOUNT_WITHOUT_ACTIVE_USER"


axtens/bugmagnet

Peter Oliquino

unread,
Sep 15, 2016, 4:34:50 AM9/15/16
to AdWords API Forum
Hi Bruce,

Could you provide your MCC customer ID and the client customer IDs you are processing for this request? Also, if it isn't too much trouble, could you also provide any SOAP request and response so we can further investigate? Please reply using Reply privately to author when sending these information.

Best regards,
Peter
AdWords API Team

Zweitze

unread,
Sep 19, 2016, 5:24:21 AM9/19/16
to AdWords API Forum
Google doesn't like "orphan" accounts, who are not member of any MCC, or have no users. Think of it, who can they contact when something goes wrong with eg. payments?

A common solution is to create an "archive" sub-MCC, link the account to that MCC first, then unlink from the main MCC.
Reply all
Reply to author
Forward
0 new messages