ClientCertificateCredential authentication failed: Request to the endpoint timed out Error - Microsoft Graph PowerShell Module
Hi everyone,
I'm experiencing an issue with the Microsoft Graph PowerShell module.
I've developed a script that uses Microsoft Graph commands to connect to the Entra ID service, retrieve information, and modify certain attributes.
On the Entra ID side, I created a Service Principal with the necessary permissions. On the server where the script runs via PowerShell, I installed a self-signed certificate in the local machine store so that it is accessible to all users on the machine.
Here’s where the problem arises:
- If I run the script using my personal user account, it completes successfully and performs the expected operations.
- If I run it using a dedicated technical user (created specifically to execute the script automatically), I receive the following error:
Additional Info:
- Both my user and the technical user are system administrators on the server and have the same permissions.
- The certificate is valid and correctly installed—my user successfully runs the script using the same certificate, and no additional certificates are installed in the current user store.
- Checking the Entra ID logs, I can see activity logs when I run the script with my user, but there are no logs when using the technical user. It seems like a network restriction, but after checking with IT, there are no Conditional Access policies, firewall rules, or other apparent blocks.
Has anyone encountered a similar issue or can suggest what might be causing this behavior? Any help is appreciated!
Thanks in advance!