Write-back fails on on-premises installations with HTTP 403 error
Microsoft has recently changed login.microsoft.com's TLS negotiations mechanism(only TLS 1.2 and above accepted) and that can cause connection issues to Microsoft Windows Server editions up to Server 2022.
With the attached registry changes, you can enable TLS 1.2 if it is not already enabled and set it as the default protocol in these .Net versions:
It will do further security improvements on your server if you use the Best Practices settings.
A restart on the server will be needed after the registry modifications.