Hi Minh,
The ManagedCustomerServiceError.CANNOT_UNLINK_ACCOUNT_WITHOUT_ACTIVE_USER error you encountered means that the account you are trying to unlink doesn't have a user with administrative access or a manager account with administrative ownership. Every account must have either one of those and you cannot unlink them if they don't have.
With regards to linking the accounts, you should use the ADD operator + PENDING link status. Then, you'll have to use the SET operator + ACTIVE link status to accept the invitation. Also, make sure to do this request on the manager account level.
Feel free to write back for any clarifications.
Regards,
Luis
AdWords API Team