Hey! We faced a similar issue in some of our on prem servers. Took a long time but we finally had a solution (or workaround). Please try below and let me know if it worked. :)
- Check whether all the azure root CAs are installed on the servers. You can find them here: https://learn.microsoft.com/en-us/azure/security/fundamentals/azure-ca-details?tabs=root-and-subordinate-cas-list#root-certificate-authorities
- Use MMC on the machine to verify you have Digicert Global Root CA, Digicert Global Root G2, Digicert Global Root G3, Digicert Global Root G4.
- import whichever certificate is missing (import both in "Current user" as well as "Local machine")
- run the Arc onboarding script
- if the script doesn't work, get the "AzureConnectedMachineAgent.msi" from a working server/browser and install the agent manually.
- if you use proxy, use "azcmagent config set proxy.url "proxy.com:port" " command to set it.
- now run the "azcmagent connect" command to connect your machine to ARC.