Catalina: Can't sign out of iCloud and Update Apple ID settings error, WindowServer high cpu. Now fixed I had this issue for a while where system prefs -&gt; icloud complained about &quot;Update Apple ID Settings&quot;.

Clicking continue it'd eventually ask for my icloud password and then it would an error

clicking sign out, i'd be asked if i wanted to save a copy of some iCloud data, then nothing would happen just takes me back to the screen with signout on it and the update apple id settings.
i tried many many things myself and with apple to resolve this including:
do at least 1 full backup first

moving keychains folder and restart

create new admin account and sign in to my apple id, all features
worked fine in new account restart into recovery, repair
permissions, reinstall os

previously to calling apple i had repaired permissions, backed up,
booted into internet recovery, reformatted the ssd, reinstalled
Catalina, created new admin account, used migrate assistant to
restore from backup, used recovery to repair permissions yet the
appled id issue persisted.

changed my apple id password

used ipad to sign out of appleid on all other devices.


In my research i had come across a blog that referenced removing the accounts in ~/Library/Accounts and deleting the mobileme plist. i couldn't find the blog again but found this stackexchange which references the same.
iCloud sign out not possible on High Sierra
i made some changes as:

i made a note of all accounts in system preferences -&gt; internet
accounts then ensured all icloud settings where on.
i created an archive of ~/Library/Accounts
put all the items in Accounts into a new folder in accounts, that
enough to stop the OS using those folders and enables a quick
restore
i archived ~/Library/Preferences/MobileMeAccounts.plist then deleted
it, i also put all plists older than 2015 (had ~ 400 of them) in a
new folder (select all the files you want then right click and
choose new folder with selection).

rebooted the Mac, opened system prefs -&gt; icloud and signed in, waited to be notified that email accounts had been added then opened Internet options and enabled them all, adding any additional iCloud accounts not present.
All appears ok with the other benefit being windowserve cpu utilisation is now in single digits from a minimum of 50+%
Hoping this will help someone
answer is in my original post.