Trouble deleting an azure account from laptop

Shawn Brown 5 Reputation points
2024-05-07T14:52:55.3533333+00:00

We are moving everyone at our company from local accounts to Azure-linked accounts. On my laptop, I wanted to see what would happen if someone else logged into it using their Microsoft credentials. They were able to do so successfully. They now show up in the log in screen and they have a user account under C:\Users. I then went to delete their account from Accounts -> Other Users but it does not show up. How do I remove this account from my laptop? Thanks.

Community Center | Not monitored
0 comments No comments
{count} vote

4 answers

Sort by: Most helpful
  1. Abiola Akinbade 29,490 Reputation points Volunteer Moderator
    2024-05-07T15:09:00.44+00:00

    Hello Shawn Brown

    Thanks for your question

    Here's how to remove the Entra ID user account that doesn't appear in "Settings -> Other Users" on your laptop:

    You need to open Command Prompt/Powershell as an admin on your computer. You can do this using Windows+X and select terminal (admin).

    You can run the command

    net user

    This will give you the list of accounts on your computer

    User's image

    Once you find the username of the account you wish to remove, you can delete it by typing. (in username below you have to use the actual user name)

    net user [username] /delete

    After running the delete command, you should receive a confirmation message stating that the command completed successfully.

    After these changes, you can proceed to reboot your computer.

    Please let me know if you have further questions

    You can mark it 'Accept Answer' if this helped.

    **


  2. Abiola Akinbade 29,490 Reputation points Volunteer Moderator
    2024-05-07T18:42:37.8133333+00:00

    Hello Shawn Brown

    thanks for the clarification.

    You can try this:

    Go to Settings and Click on Accounts.

    Select Access work or school and Find the account you want to remove (AzureAcct2).

    Click Disconnect.

    Restart your computer.
    This should remove the account.

    or alternatively in Powershell as admin:
    Get-LocalUser

    Remove-LocalUser -Name "AzureAcct2"

    Please let me know if this helped

    0 comments No comments

  3. Daniel Flesch 0 Reputation points
    2024-08-12T15:59:59.2233333+00:00

    Get-Localuser doesn't show azure accounts for me running as admin logged in with a azure account.

    User's image

    See Image above.

    0 comments No comments

  4. Shawn Brown 5 Reputation points
    2024-08-13T13:52:35.0233333+00:00

    I may not have described my issue well enough but I did figure out how to do this. The key was that I needed to remove their profile. I did this by Settings > System > Advanced System Settings > User Profiles - Settings. I then found the profile and deleted it. Now it no longer shows up as an log in option.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.