Skip to content

xg license get-platform-id

Terminal window
xg license get-platform-id

xg license get-platform-id prints the Platform ID for the current machine — a persistent UUID that uniquely identifies this XrmGhost installation. The command reads the stored identifier from local application data and writes it to the console, then exits.

When the XrmGhost CLI runs for the first time, it generates a random UUID (version 4) and persists it in the user application data directory:

PlatformStorage path
Windows%LOCALAPPDATA%\XrmGhost\XrmGhostCli\machine_id.dat
Linux$XDG_DATA_HOME/xrmghost/xrmghostcli/machine_id.dat (falls back to ~/.local/share/…)
macOS~/Library/Application Support/xrmghost/xrmghostcli/machine_id.dat

The Platform ID is a standard hyphenated GUID string, for example 3fa85f64-5717-4562-b3fc-2c963f66afa6. It is stable across CLI updates as long as the application data directory is preserved. If the file is deleted the CLI generates a new GUID on the next run, which will invalidate any previously issued licenses bound to the old ID.

The Platform ID is the machine-side anchor of the XrmGhost licensing model:

  • License activationxg license activate sends the Platform ID to the AKMS service alongside the bootstrap key to issue a machine-bound API key.
  • License validation — on every run the CLI verifies that the local license corresponds to the current machine’s Platform ID.
  • Administrator workflows — when an administrator provisions a license seat they need the Platform ID to target the correct machine. Use this command to retrieve and copy it.

The value is identical in format across all supported platforms (Windows, Linux, macOS). However, the storage path differs per platform (see the table above). If the storage location is inaccessible (for example due to permission issues) the command exits with code 1 and prints an error message.

This command has no flags or options.

Retrieve the Platform ID for this machine:

Terminal window
xg license get-platform-id

Expected output:

Your Platform ID is: 3fa85f64-5717-4562-b3fc-2c963f66afa6
Please provide this ID to the administrator if requested for licensing purposes.

The GUID value will differ on every machine. Copy the displayed value and share it with your administrator when requested.

CodeMeaning
0Success — Platform ID retrieved and printed
1Error — Platform ID could not be read (storage access failure or missing data)