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.


On Thursday, September 15, 2016 at 10:09:52 AM UTC+2, axtens wrote:
>
> 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
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 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/4fb99f29-999f-4c1c-8458-80588147ca99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to