Hi Pablo-0567,
Thanks for visiting our forum. Here we focus on Skype for business troubleshooting.
Based on your description, it is more related to code development, which we don’t support. The following suggestion is just for you reference. Thanks for your understanding.
Here is a script which can clean up the Skype for Business User Profile. You can download the codes and try to run it.
If the response is helpful, please click "Accept Answer" and upvote it.