Hello, I am an IT admin in our company using SharePoint Server 2019, we have recently met a strange issue where some particular user can't use the new OneDrive Sync to sync any document libraries... Two days ago one of our users with the right privileges in Active Directory finds that they can't access the desired remote location, after several failed attempts to fix this we deleted their account and configured a new one with the same sAMAccountName and userPrincipalName, and they can access that location as normal. The problem happens when they are trying to sync the public document library in SharePoint Server, OneDrive Sync opens up as normal but after login and choosing local folder they get "Sorry, OneDrive can’t add your folder right now." error, while other users including a new user can sync as normal. I have checked this link and it didn't solve the problem (since others can sync).
We have tried updating their account information from the Active Directory using:
Set-SPUser -Identity "<corpname>\<username>" -Web "https://<url>" -SyncFromAD
And the problem persists, then we tried removing their SharePoint account using:
Get-SPSite "https://<url>" | Get-SPWeb | Remove-User "<corpname>\<username>"
Which still didn't solve the problem. Is there a way to solve this without creating another account with another account name?