Welcome to Microsoft Q&A! Thanks for posting the question.
I am assuming that you are trying to use a Windows VM as Hybrid worker and the Azure Automation account has a private endpoint enabled.- Please reply with the OS details, in case you are not using Windows VM.
Here are some of the troubleshooting guidelines which should help you:
1. Ensure that the machine meets the pre-requisite criteria as mentioned here.
2. While creating the "private endpoint", ensure that you have used "target sub-resource" as "DSCAndHybridWorker"
3. Ensure that the private end point of automation account is connected to the same Virtual Network, to which the Hybrid worker VM is connected. To ensure that they are the same, please check the following:
a. Go to Azure Automation Account --> Networking --> "Private access" tab
b. Select the endpoint --> "Virtual network/subnet" --> Note the "Virtual network ID"
c. Got to the Hybrid Worker VM --> Networking --> select the "Virtual network/subnet"
d. Ensure that the virtual network ID is identical for step b. and c. above. I ran into similar issues when I had accidentally enabled endpoint for Azure Automation account to a different Virtual Network.
4. Ensure that "System Assigned Identity" is enabled on Hybrid worker VM.
In case the steps above don’t help, the following troubleshooting guidelines should help you: Troubleshoot Extension based Hybrid worker.
If the steps/information above do not help, can you please share details about the steps taken to install the extension-based hybrid worker role (ARM/PowerShell/Portal etc.). Also, please let me know if you are using proxy to communicate with Automation Endpoints or have a firewall in place. This link contains information about firewall usage/ports and URLs required.
Please let me know if you have any questions.
---
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.