# Publish Visual Studio Marketplace extensions securely with Trusted Publishing

DevFeed: [Publish Visual Studio Marketplace extensions securely with Trusted Publishing](<https://devfeed.tech/articles/publish-visual-studio-marketplace-extensions-securely-with-trusted-publishing-105540.md>)

Original publisher: [Read original article](<https://devblogs.microsoft.com/blog/trusted-publishing-visual-studio-marketplace/>)

Author: Lynn Dai

Published: 2026-10-28T16:59:00Z

Content type: release

Language: en

Sources: [Developer Blogs](<https://devfeed.tech/sources/developer-blogs.md>)

Topics: [VS Code Extension](<https://devfeed.tech/topics/vscode-extension.md>), [CI/CD secrets management](<https://devfeed.tech/topics/ci-cd-secrets-management.md>), [Secure token management](<https://devfeed.tech/topics/secure-token-management.md>), [Visual Studio Code](<https://devfeed.tech/topics/visual-studio-code.md>), [personal access token](<https://devfeed.tech/topics/personal-access-token.md>), [Visual Studio](<https://devfeed.tech/topics/visual-studio.md>)

Tags: [azure](<https://devfeed.tech/tags/azure.md>), [azure-devops](<https://devfeed.tech/tags/azure-devops.md>), [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [contributor](<https://devfeed.tech/tags/contributor.md>), [extensions](<https://devfeed.tech/tags/extensions.md>), [github](<https://devfeed.tech/tags/github.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [github-discussions](<https://devfeed.tech/tags/github-discussions.md>), [github-policy](<https://devfeed.tech/tags/github-policy.md>), [github-repository](<https://devfeed.tech/tags/github-repository.md>), [identity](<https://devfeed.tech/tags/identity.md>), [marketplace](<https://devfeed.tech/tags/marketplace.md>), [microsoft-for-developers](<https://devfeed.tech/tags/microsoft-for-developers.md>), [oidc](<https://devfeed.tech/tags/oidc.md>), [personal-access-token](<https://devfeed.tech/tags/personal-access-token.md>), [pipelines](<https://devfeed.tech/tags/pipelines.md>), [publishing](<https://devfeed.tech/tags/publishing.md>), [security](<https://devfeed.tech/tags/security.md>), [trusted-publishing](<https://devfeed.tech/tags/trusted-publishing.md>), [visual-studio](<https://devfeed.tech/tags/visual-studio.md>), [visual-studio-code](<https://devfeed.tech/tags/visual-studio-code.md>), [visual-studio-marketplace](<https://devfeed.tech/tags/visual-studio-marketplace.md>), [workload-identity-federation](<https://devfeed.tech/tags/workload-identity-federation.md>)

## AI overview

Trusted Publishing lets Visual Studio Code and Visual Studio extensions be released from GitHub Actions or Azure Pipelines without a long-lived Marketplace PAT. Marketplace verifies federated identity; GitHub Actions receives a temporary credential that expires after 15 minutes. GitHub setup requires a policy naming the repository and workflow, plus `id-token: write` and an OIDC publishing command. For private repositories, the policy must be used within 48 hours; a successful token exchange activates it permanently, while an unused policy expires and can be reopened. Azure Pipelines instead uses a Workload Identity Federation service connection backed by a Microsoft Entra app and service principal or managed identity, with that identity granted the publisher's Contributor role. Do not create a Marketplace policy for Azure Pipelines. Existing PAT publishing remains supported; remove the PAT only after verifying a successful federated publish.

## Source excerpt

Publish Visual Studio Code and Visual Studio extensions from GitHub Actions or Azure Pipelines without storing a long-lived personal access token. The post Publish Visual Studio Marketplace extensions securely with Trusted Publishing appeared first on Microsoft for Developers.