Exchage ActiveSync – HTTP 500 Internal Server Error for some users.

For some users Microsoft Connectivity Analyser is trowing error :

Attempting the FolderSync command on the Exchange ActiveSync session.
The test of the FolderSync command failed.

Tell me more about this issue and how to resolve it

Additional Details
Exchange ActiveSync returned an HTTP 500 response (Internal Server Error). HTTP

Test-ActivesyncConnectivity for the same user is generation error :
Error : [System.Net.WebException]: Der Remoteserver hat einen Fehler zurückgegeben: (500)
Interner Serverfehler.
If you search for solution in Internet almost all solutions are to activate the Inheritance for the affected user. But this is not helping.
So after some more research I found that in the test-ActiveSyncConnectivity error with |FL we see that the ActiveSyncDevices are mentioned:

Für den Benutzergerätecontainer ‘CN=ExchangeActiveSyncDevices,CN=username,OU=Users,OU=OU1,OU=User,DC=domain,DC=com’ in Active Directory konnten keine Sicherheitseinstellungen übernommen werden. Löschen Sie den Container, sofern dieser leer ist.”

in English

Exception message: Security settings couldn’t be applied to the user device container ‘CN=ExchangeActiveSyncDevices,CN=username,OU=Users,OU=OU1,OU=User,DC=domain,DC=com’ in Active Directory. Delete the container if it’s empty.

The Solution was to delete the CN=ExchangeActiveSyncDevices from ADSI.edit for the affected user.