Skip to the stories
Microsoft 365 & SharePoint

Visual Studio Marketplace Adds PAT-Free Publishing for GitHub Actions and Azure Pipelines

Trusted Publishing replaces long-lived Marketplace PATs with federated identity. GitHub Actions gets 15-minute credentials; Azure Pipelines uses WIF.

Visual Studio Marketplace Adds PAT-Free Publishing for GitHub Actions and Azure Pipelines

Extension teams can publish to Visual Studio Marketplace from GitHub Actions or Azure Pipelines without keeping a long-lived Azure DevOps personal access token (PAT) in their CI/CD secrets. Trusted Publishing checks a pipeline’s federated identity before granting publishing access, reducing the need to store and rotate a credential that could otherwise be reused by workflow steps.

For GitHub Actions, Marketplace issues a temporary credential that expires after 15 minutes. Azure Pipelines uses Workload Identity Federation (WIF) through an Azure DevOps service connection. Existing PAT-based publishing still works, so teams can move workflows over one at a time and retain the PAT until a federated publish has succeeded.

Two providers, two setup paths

Both supported providers use federated identity, but their configuration differs. GitHub Actions requires a policy on the extension publisher’s Trusted Publishing page. That policy identifies the repository and workflow permitted to publish. Azure Pipelines instead uses a WIF service connection, with its identity added to the Marketplace publisher as a Contributor. Azure Pipelines does not require a Marketplace Trusted Publishing policy.

Provider Configuration
GitHub Actions Create a Trusted Publishing policy for the repository and workflow, then publish with GitHub OIDC.
Azure Pipelines Configure a WIF service connection and add its identity to the publisher with the Contributor role.

The Azure Pipelines connection can use a Microsoft Entra app registration and service principal, or a managed identity. Setup details are available in Microsoft’s guide to configuring a Microsoft Entra-backed WIF service connection. The identity must also be added to the Marketplace publisher with the Contributor role.

Configure the GitHub policy precisely

In Visual Studio Marketplace publisher management, open the publisher that owns the extension and select Trusted Publishing. The policy binds publishing permission to specific GitHub workflow details, so enter the repository owner, repository name and workflow filename exactly. If the workflow uses a GitHub environment, include its exact name as well.

The Trusted Publishing tab for configuring GitHub Actions policies in Visual Studio Marketplace

The policy form includes these fields:

  • Policy name: Use a label that helps identify the release workflow, such as Release workflow.
  • Repository owner: Enter the exact GitHub organization or user login, such as contoso.
  • Repository: Enter the repository name without its owner, such as sample-extension.
  • Workflow: Enter the workflow filename stored under .github/workflows, such as publish.yml.
  • Environment: If the workflow uses a GitHub environment, enter its exact name, such as production.

Creating a Trusted Publishing policy with fictional test account data

Private repositories have an additional activation window: after creating a policy, run the configured workflow within 48 hours. The first successful token exchange activates that policy permanently. If no successful exchange occurs during the initial window, the policy expires and can be reopened for another 48 hours. The Trusted Publishing page shows each policy’s status and last use.

Update and verify the publishing workflow

For Visual Studio Code extensions published with vsce, migration involves creating the policy, adding id-token: write to the publishing job and changing the publishing command to use OIDC. Run the workflow and confirm that the federated publish succeeds before removing the Marketplace PAT from workflow and repository secrets. Keeping the PAT until that first successful run gives the team a way to validate the change before retiring the existing credential.

After the OIDC publish succeeds, delete the unused PAT. Removing it matters because another workflow step could otherwise continue to use the stored secret. The Visual Studio Code documentation provides the workflow steps for secure automated publishing to Visual Studio Marketplace.

Visual Studio extension publishers can use the command-line publishing process described in the Visual Studio extension publishing guide. For Azure Pipelines, configure the WIF connection, grant its identity the Marketplace Contributor role, and update the publishing step to use that connection. Remove the PAT only after the federated publish succeeds.

What administrators should check

The main operational change is how the publishing job proves its identity. With a PAT, the workflow retrieves a stored credential; with Trusted Publishing, Marketplace validates the configured workflow identity and grants access for the publish. GitHub’s temporary credential lasts 15 minutes, while Azure Pipelines relies on the configured WIF service connection. Teams should check that the workflow, repository details and any GitHub environment match the policy, and that the Azure identity has the required publisher role.

Trusted Publishing supports publishing both Visual Studio Code and Visual Studio extensions. It does not require every extension or pipeline to migrate at once, and PAT-based publishing remains available during transition. Start with the release workflow, verify the federated publish, then remove the corresponding stored PAT so the old credential is no longer available to the pipeline.

Setup and troubleshooting instructions are available in the Trusted Publishing documentation. Teams can also share feedback in the Visual Studio Marketplace GitHub discussions.

Source: Lynn Dai · devblogs.microsoft.com

Same flag