Skip to content

Microsoft Store

Роман Зопиров edited this page Oct 28, 2026 · 2 revisions

Microsoft Store Module (mstore)

The Microsoft Store module integrates directly with the Microsoft Partner Center Dev Center Ingestion API (v1.0) to fully automate publishing Windows desktop applications (.msix, .msixupload, .zip).


Prerequisites & Credentials

To publish to the Microsoft Store via API, you need:

  1. Partner Center Account: An active Windows developer account.
  2. Azure AD Application: Linked to Partner Center under Account settings -> User management -> Azure AD applications.
  3. Application ID (Product ID): 12-character alphanumeric ID of your reserved app (e.g., 9NZXP5WR803J).
  4. Seller ID: Your Partner Center Seller ID (e.g., 94042650).

Required credential fields:

Field Flag Environment Variable Description
App ID --app-id STORE_APP_ID Store Product ID (e.g. 9NZXP5WR803J)
Tenant ID --tenant-id STORE_TENANT_ID Azure AD Directory (tenant) ID
Client ID --client-id STORE_CLIENT_ID Azure AD Application (client) ID
Client Secret --client-secret STORE_CLIENT_SECRET Azure AD Client secret value
Seller ID --seller-id SELLER_ID Partner Center Account ID

Commands Overview

Commands:
  publish       Upload package, update metadata, and commit submission to certification
  status        Inspect current application and pending submission status
  delete-draft  Delete uncommitted draft submission if stuck in PendingCommit
  configure     Save credentials locally to ~/.octo/mstore.json or .octopublish.json

1. publish Command

The core command for production CI/CD pipelines.

octopublish mstore publish [options]

Workflow Performed Automatically:

  1. Authenticates against Azure AD OAuth 2.0 endpoint (login.microsoftonline.com).
  2. Queries the application to inspect existing submissions.
  3. Safety Check: If an active submission is already in Release or Certification, safely logs [SKIP] with code 0 to prevent destructive 409 Conflict aborts.
  4. If a draft submission already exists (PendingCommit), reuses it; otherwise, creates a new draft submission.
  5. Obtains Azure Blob Storage SAS Upload URL.
  6. Automatically wraps .msix files into a temporary .zip container (required by Partner Center).
  7. Encodes signature query parameters (+ -> %2B) and streams package blocks with progress visualization.
  8. Synchronizes application packages and localized release notes (whatsnew-ru-RU, whatsnew-en-US, etc.).
  9. Commits the submission to Microsoft Store Certification.

Options:

  --package <path>        Path to .msix, .msixupload, or .zip archive (Required)
  --app-id <id>           Store Product ID (Fallback: STORE_APP_ID secret)
  --tenant-id <id>        Azure AD Tenant ID (Fallback: STORE_TENANT_ID secret)
  --client-id <id>        Azure AD Client ID (Fallback: STORE_CLIENT_ID secret)
  --client-secret <sec>   Azure AD Client Secret (Fallback: STORE_CLIENT_SECRET secret)
  --seller-id <id>        Partner Center Seller ID (Fallback: SELLER_ID secret)
  --notes <path>          Path to single release notes text file (applied to all languages)
  --notes-dir <path>      Directory containing localized notes (whatsnew-ru-RU, whatsnew-en-US)
  --desc <path>           Path to single store description file
  --desc-dir <path>       Directory containing localized descriptions

Example with Single Release Notes:

octopublish mstore publish \
  --package "./bin/Release/Obxodka_6.0.8_x64.msix" \
  --notes "./packaging/whatsnew/whatsnew-ru-RU"

Example with Localized Release Notes Directory:

Given a folder structure:

packaging/whatsnew/
|-- whatsnew-ru-RU
|-- whatsnew-en-US
|-- whatsnew-zh-CN

Run:

octopublish mstore publish \
  --package "./dist/App.msix" \
  --notes-dir "./packaging/whatsnew"

OctoPublisher will automatically parse the locale suffixes and update each corresponding store listing in Partner Center.


2. status Command

Inspects the current state of an application, existing packages, flightings, and pending submission lifecycle.

octopublish mstore status --app-id "9NZXP5WR803J"

Sample output:

[INFO] OctoPublisher CLI v1.0.0 (.NET 10)
[*] Checking application status for ID: 9NZXP5WR803J...
[+] Application: Obxodka VPN
[+] Status: Published
[+] Current Submission ID: 1152921505697204200
[+] Submission Status: Release

3. delete-draft Command

If an automated build crashed mid-way or an uncommitted submission is blocking the pipeline in PendingCommit state, use delete-draft to reset the submission queue.

octopublish mstore delete-draft --app-id "9NZXP5WR803J"

4. configure Command

Saves credentials locally or globally so you don't need to specify --client-id and --tenant-id on every CLI invocation.

Save to User Home (~/.octo/mstore.json):

octopublish mstore configure \
  --app-id "9NZXP5WR803J" \
  --tenant-id "00000000-0000-0000-0000-000000000000" \
  --client-id "11111111-1111-1111-1111-111111111111" \
  --client-secret "your-secret" \
  --seller-id "94042650"

Save to Current Workspace (.octopublish.json):

octopublish mstore configure --local \
  --app-id "9NZXP5WR803J" \
  --tenant-id "00000000-0000-0000-0000-000000000000" \
  --client-id "11111111-1111-1111-1111-111111111111"

(Make sure to add .octopublish.json to .gitignore if it contains secrets!)

Clone this wiki locally