Sounds like the account used to join doesn't have enough permissions. Usually because the computer was joined previously by using different computer account credentials. (Assuming you did not join it to domain). So you must first delete the existing account or get full permissions on the account.
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc961817(v=technet.10)?redirectedfrom=MSDN
--please don't forget to upvote
and Accept as answer
if the reply is helpful--