SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So right now I'm trying to delete a managed user account in my SharePoint Server farm as we try and make him non-existent, using the following code:
$s = get-spmanagedaccount "Account_Name"

Getting the following error message:

Exception calling "Delete" with "0" argument(s): "The account is still being used by these components:
security token service application

Also remove-spmanagedaccount had no better success.

Now I must have looked everywhere for a configuration for the Security Token Service Application but have come up dry. Central Administration, PowerShell, API, Config Files, even shut down the farm and took a peek in the config database which I know isn't right, but no success. Anyone have any ideas?

It should be noted that this is the former database access account, that we need to remove. We already changed everywhere else we can including stsadm -o updatefarmcredentials.

share|improve this question
same issue for me. Did you ever get this fixed? – user9351 Jul 7 '12 at 17:33

It is SP 2010?

Did you tried:

Central Administration > Security > General Security > Configure service accounts > [Select One] Service Application Pool - SecurityTokenServiceApplicationPool

or shortcut to it:

http://[CA url]/_admin/FarmCredentialManagement.aspx

share|improve this answer
See above comments, but got this error after clicking on link in Central Admin: Error Some or all identity references could not be translated. Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: acorrelationid Date and Time: 9/20/2011 5:30:06 PM – tekiegreg Sep 20 '11 at 23:30
As this is largely experimental for me, I don't want to accept "this can't be done" as an answer. I'm really hoping I can remove a db access account and still have a survivable farm... – tekiegreg Sep 20 '11 at 23:41
Did you check Application Pools identities directly via IIS Manager? I don't recommend changing them there but just as information. – Vedran Rasol Sep 20 '11 at 23:53
tried that as well, set them to my new login, no dice :-( – tekiegreg Sep 21 '11 at 15:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.