ERROR

Running scheduled Python task under a group managed service account throws an ArcGIS Pro License error

Last Published: April 8, 2026

Error Message

When running an ArcPy script as a scheduled task under a group managed service account (gMSA), the task may fail with the error:

“The Product License has not been initialized”

This applies to:

  • ArcGIS Pro Licensing
  • ArcPy scripts
  • Windows Task Scheduler
  • Group Managed Service Accounts (gMSA)

Cause

When ArcGIS Pro is authorized or configured, the license information is written to the current user’s profile (registry). A gMSA account has no ArcGIS Pro license configuration unless Pro is launched at least once under that account’s context.

As a result, when a scheduled task attempts to run a Python script that imports and uses ArcPy under a gMSA, ArcGIS Pro cannot find a valid initialized license and terminates execution.

Solution or Workaround

  1. Download PsTools and extract to a known path (for example: C:\PSTools).
    • PsExec64.exe is needed to launch Powershell with the gMSA user account.
  2. Open PowerShell ISE as Administrator.
  3. Ensure the gMSA account is a member of the local Administrators group on the machine.
    • Go to Edit Local Users and Groups > Groups > Administrators. Add the gMSA user if necessary.
  4. Start PowerShell ISE as an admin.
  5. Launch PowerShell Under the gMSA by running the following script in PowerShell ISE.
C:\PSTools\PsExec64.exe -i -u DOMAIN\gMSAAccount$ -p ~ powershell.exe
    • This opens a new PowerShell window running as the gMSA user.
    • -p ~ flag is required, as gMSAs do not have a traditional password.
  1. In the PowerShell window, verify the Active User Context; confirm the session is running under the gMSA account with the following command:
whoami
  1. From the gMSA PowerShell session, start ArcGIS Pro.
Start-Process "C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe"
    • If necessary, click OK in the pop-up dialog box about Microsoft Edge.
  1. Configure ArcGIS Pro Licensing.
  2. Exit the application after licensing has been successfully configured.
  3. Re-run the Scheduled Task: execute the scheduled task again under the gMSA account.
    • The task should now run successfully without licensing errors.

Article ID: 000040955

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options