How to Connect a Windows VPS to Power Automate Cloud


How to Connect a Windows VPS to Power Automate Cloud (Fix Entra Join Error)

Connecting a Windows VPS to your Power Automate cloud environment is a common requirement when running on-premises style automations or gateway connections from a virtual server. However, many users run into an "Entra Join" error during this process. This guide explains the setup and how to fix that error.

Why Connect a Windows VPS to Power Automate?

A Windows VPS is often used to:

  • Run the On-Premises Data Gateway for connecting to local resources
  • Host desktop flows (RPA) that need to run unattended
  • Act as a bridge between cloud flows and internal systems (like databases or legacy apps)

For these scenarios, the VPS often needs to be joined to Microsoft Entra ID (formerly Azure AD) so it can securely authenticate and communicate with the Power Automate cloud service.

Common Cause of the Entra Join Error

The Entra Join error usually happens because of one or more of the following:

  • The VPS's system clock is out of sync with actual time, causing token validation failures
  • The VPS lacks proper network access to Microsoft's authentication endpoints
  • Required Entra ID roles or licenses aren't assigned to the device or user account
  • TPM (Trusted Platform Module) requirements aren't met on the virtual machine

Step-by-Step Setup and Fix

Step 1: Check System Time and Time Zone

Make sure the VPS's date, time, and time zone are correctly synced with an internet time server. Even a few minutes of drift can cause authentication tokens to be rejected.

Step 2: Verify Network Connectivity

Ensure the VPS can reach Microsoft's authentication and Entra endpoints. Firewalls or restrictive VPS provider network rules sometimes block these connections. Whitelist the necessary Microsoft 365 and Entra ID URLs if needed.

Step 3: Check TPM Availability

Some VPS providers don't expose a virtual TPM by default. Confirm with your hosting provider whether TPM 2.0 is enabled for your VPS instance, as Entra Join can require it depending on your organization's policies.

Step 4: Sign In with the Correct Account

When running the Entra Join process (via Settings > Accounts > Access work or school account > Connect), make sure you're using an account that has the necessary permissions and license assigned in the Microsoft 365 admin center.

Step 5: Re-run the Join Process

After confirming time sync, network access, and TPM availability, re-attempt the join:

  • Go to Settings > Accounts > Access work or school account
  • Click Connect
  • Sign in with your work account and complete the authentication prompts

Step 6: Install the On-Premises Data Gateway (If Needed)

Once the VPS is successfully joined, download and install the On-Premises Data Gateway from the Power Platform admin center, then sign in with the same account used for the join process.

Step 7: Configure the Gateway in Power Automate

In Power Automate, go to Data > Gateways, confirm the new gateway appears, and configure the connections you need (like SQL Server or SharePoint on-prem) through it.

Step 8: Test the Connection

Create a simple test flow that uses the gateway connection to confirm everything is working end-to-end.

Additional Tips

  • If the error persists after fixing time sync and network access, check the Entra ID sign-in logs in the Microsoft 365 admin center for more specific error codes.
  • Restarting the VPS after making network or TPM-related changes often resolves lingering authentication issues.
  • Keep the VPS's Windows updates current,

Want to automate your business? Book a Free Strategy Call