You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enable VS Code sign‑in with Microsoft Entra ID to connect to Private Marketplace #280376
As an enterprise developer signed into VS Code with Microsoft Entra ID (formerly Azure AD), I want VS Code to automatically discover and connect to my organization’s Private Marketplace, so I can access internal extensions.
User Story
As an enterprise developer
When I sign into VS Code using my Microsoft Entra ID work account
Then VS Code should securely connect to my organization’s Private Marketplace.
Problem / Pain Points
VS Code currently enables connecting to Private Marketplace by signing in with GitHub Enterprise (GHE) / Copilot (Pro/Enterprise). Many enterprises that use GHE do not have seats/subscriptions for 100% of developers who need to use Private Marketplace. On the other hand all their developers have and can sign with an Entra ID work account. These organizations are currently unable to roll out to Private Marketplace for production use.
Acceptance Criteria
When Private Marketplace is configured through policy settings, signing in with either GHE, Copilot (PRO/ENT) or Entra ID work account should connect VS Code to the organization's Private Marketplace.
Plan: Entra ID & Visual Studio Subscription Eligibility for Private Marketplace
Overview
The Private Marketplace currently only allows access via GitHub Enterprise / Copilot sign-in, blocking enterprise customers who use Microsoft Entra ID or Visual Studio Subscriptions. This plan adds two new eligibility paths — Entra ID and Visual Studio Subscription — alongside the existing GitHub path.
A new enterprise policy field (extensions.gallery.authProvider) tells VS Code which auth provider the configured marketplace accepts. GalleryManifestService reads this policy and routes to the correct auth flow — either the existing GitHub/GHE path or a new Microsoft path. When the user needs to sign in, VS Code tells them exactly which account to use based on the policy — no picker, no guessing. Account classification and subscription checks happen server-side on the Private Marketplace — the VS Code client never parses tokens.
Eligibility Matrix
Path
Eligible
Notes
GitHub Enterprise / Copilot
Yes
Existing (unchanged)
Entra ID (work/school)
Yes
New
Visual Studio Subscription
Yes
New — regardless of sign-in type
MSA only, no VSS
No
Explicitly excluded
Key Architecture Decisions
Decision
Outcome
Provider routing
New extensions.gallery.authProvider policy field ('github' or 'microsoft')
Service design
No new service — Microsoft auth logic (~40 lines) added directly to GalleryManifestService
Sign-in UX
Provider-specific sign-in message (no picker — policy determines the provider)
Account type detection
Server-side classification by Private Marketplace (no client token parsing)
VSS entitlement check
Server-side proxy via Private Marketplace → Ev4 API
Eligibility API hosting
Private Marketplace (Gallery Backend)
Caching
Access result cached in storage above provider routing; only invalidated by auth service responses, never by network errors
Proposal
Eligibility Check Flow
GalleryManifestService caches the access result in IStorageService and checks it before contacting any auth provider. If a cache hit exists, the result is applied immediately (marketplace available without delay) and the provider-specific check runs in the background. Both flows benefit equally.
Startup (cache-first):
Read cached access result from storage
If cache hit → apply immediately (show marketplace or appropriate status)
Background-validate via the auth provider (steps below)
If no cache → run provider check synchronously (user waits)
GalleryManifestService reads the extensions.gallery.authProvider policy and routes to one of two flows:
sequenceDiagram
participant User
participant Viewlet as Extensions Viewlet
participant GMS as GalleryManifestService
participant Storage as IStorageService
participant Auth as IAuthenticationService
participant PM as Private Marketplace
User->>Viewlet: Open Extensions
Viewlet->>GMS: getExtensionGalleryManifest()
GMS->>Storage: Read cached access result
Storage-->>GMS: Cached result (or null)
alt Cache hit
GMS->>Viewlet: Apply cached status immediately
Note over GMS: Background validate via auth provider
end
Note over GMS: Policy says authProvider = 'microsoft'
GMS->>Auth: getSessions('microsoft', scopes)
Auth-->>GMS: Microsoft session (or null)
alt No session (auth service responded)
GMS->>Storage: Clear cache
GMS->>Viewlet: RequiresSignIn
Viewlet->>User: "Sign in with your Microsoft account"
User->>Viewlet: Clicks sign-in
Viewlet->>Auth: createSession('microsoft', scopes)
Auth-->>GMS: Session available (via onDidChangeSessions)
end
GMS->>PM: POST /eligibility (Bearer token)
Note over PM: Validate token, inspect tid claim
Note over PM: Entra → eligible
Note over PM: MSA → check VSS entitlements
PM-->>GMS: { eligible, reason }
GMS->>Storage: Cache definitive result (200 OK only)
alt Eligible
GMS->>GMS: Fetch gallery manifest
GMS->>Viewlet: Available
Viewlet->>User: Show marketplace extensions
else Ineligible
GMS->>Viewlet: AccessDenied
Viewlet->>User: "Your account does not have access"
end
alt Network/server error
Note over GMS: Keep existing cache — never invalidate on transient errors
end
Loading
Auth Flow: GitHub Provider (unchanged)
When authProvider is 'github' (or unset), the existing flow is preserved exactly: GalleryManifestService → DefaultAccountService.getDefaultAccount() → checkAccess(account).
No changes to the GitHub path.
Sign-In UX
The sign-in prompt tells the user exactly which account to use, based on the authProvider policy — no provider picker needed.
The sign-in command reads the policy and routes directly:
"Sign in with your Microsoft account to access the Extensions Marketplace."
"Sign in with GitHub to access the Extensions Marketplace."
AccessDenied
"Your Microsoft account does not have access. An Entra ID (work or school) account or Visual Studio Subscription is required."
"Your account does not have access. Please contact your administrator."
Caching & Air-Gapped Support
The access result is cached in IStorageService (StorageScope.APPLICATION, StorageTarget.MACHINE) and sits above provider routing, following the same pattern as DefaultAccountService. Both GitHub and Microsoft flows read from and write to the same cache. This ensures the marketplace works on reload even when connectivity is unavailable.
Behavior:
Startup with cache: Apply cached result immediately (before any auth or network calls), then validate via the auth provider in the background. If the background result differs, update status.
Startup without cache: Check eligibility synchronously via the provider (user waits for result).
Network/server error with cache: Keep using cached result — don't disrupt the user. Cache is never touched.
Network/server error without cache: No status change (user sees initial state).
Cache is invalidated when (auth service responses only):
onDidChangeSessions('microsoft') — auth service reports session added, removed, or changed
onDidChangeDefaultAccount — auth service reports GitHub account changed or removed
getSessions() returns empty array — auth service confirms no sessions exist (sign-out)
Policy configuration changes — admin changed authProvider or serviceUrl
Cache is NOT invalidated when:
Network timeout or DNS failure contacting the eligibility endpoint
The microsoft entry reserves the key for future extension-based callers. Since the eligibility service runs in the workbench (main process), it may not need explicit trust — but this should be verified during implementation by testing whether getSessions('microsoft') returns sessions without a trust prompt.
Open Questions / Dependencies
Private Marketplace eligibility endpoint URL and API contract (TBD)
Ev4 onboarding: Private Marketplace AAD app registration with VS Subscriptions team
Microsoft auth scopes for eligibility endpoint (TBD)
Qualifying subscriptionLevelCode / subscriptionChannel combinations (coordinate with Aaron Mast / Chee Seong Ong)
Air-gapped / offline: Resolved — access result is cached in storage (StorageScope.APPLICATION) above provider routing. On startup, the cached result is applied immediately before any auth or network calls. Background validation runs through the provider flow when connectivity is available. Cache is only invalidated by auth service responses, never by network errors.
Michael Cummings (MSFT) (@mcumming) Thanks for the proposal. Lets discuss the flow / steps one by one to see if we are covering all scenarios and going in the right direction.
I like that you want to show sign in when user does not have access to private marketplace. How do you detect that? Lets say if user is already signed into GH.com / MSFT or both with Private Marketplace configured - how do you determine if the user has access to the Private Marketplace or not?
When user is not signed in to either GH / MSFT, how does user knows which account to pick if we show both options so that user gets access to the Private Marketplace?
I like that you want to show sign in when user does not have access to private marketplace. How do you detect that? Lets say if user is already signed into GH.com / MSFT or both with Private Marketplace configured - how do you determine if the user has access to the Private Marketplace or not?
This is how the Extension view works today, but without the added EntraID auth. I describe the updated flow here:
Path 1 (GitHub/GHE): Check existing DefaultAccountService — enterprise flag or Copilot SKU match
Path 2 (Entra ID): If no GitHub access, send Microsoft auth token to Private Marketplace eligibility endpoint. Server validates token and classifies via tid claim. Entra ID accounts are eligible.
Path 3 (VSS): If MSA account, Private Marketplace checks VS Subscription entitlements server-side via Ev4 API. Active qualifying subscription = eligible.
First eligible path wins (priority order: GHE → Entra → VSS)
The new MarketplaceEligibilityService sits between the GalleryManifestService and the auth providers, evaluating eligibility across three independent paths before the manifest service makes its access decision.
%%{init: {'theme': 'base', 'themeVariables': {
'background': '#ffffff',
'primaryTextColor': '#212121',
'lineColor': '#37474f',
'labelBoxBkgColor': '#ffffff',
'labelBoxBorderColor': '#37474f',
'labelTextColor': '#1a237e',
'signalColor': '#37474f',
'signalTextColor': '#0d47a1',
'noteBkgColor': '#e3f2fd',
'noteBorderColor': '#1565c0',
'noteTextColor': '#0d47a1',
'actorBkg': '#e8eaf6',
'actorBorder': '#3949ab',
'actorTextColor': '#1a237e',
'activationBkgColor': '#c5cae9',
'activationBorderColor': '#3949ab',
'sequenceNumberColor': '#ffffff'
}}}%%
sequenceDiagram
participant User
participant Viewlet as Extensions Viewlet
participant GMS as GalleryManifestService
participant MES as MarketplaceEligibilityService
participant DAS as DefaultAccountService
participant GitHub as GitHub Auth Provider
participant MSFT as Microsoft Auth Provider
participant PM as Private Marketplace
participant Ev4 as Ev4 Entitlement API
User->>Viewlet: Open Extensions
Viewlet->>GMS: getExtensionGalleryManifest()
GMS->>MES: checkEligibility()
Note over MES: Path 1 — GitHub/GHE
rect rgb(227, 242, 253)
MES->>DAS: getDefaultAccount()
DAS-->>MES: IDefaultAccount (or null)
end
alt GitHub account eligible
rect rgb(187, 222, 251)
MES-->>GMS: ✅ Eligible (GitHubEnterprise / CopilotSKU)
end
else No GitHub access — fall through to Path 2
Note over MES: Path 2 — Entra ID
rect rgb(232, 245, 233)
MES->>MSFT: getSessions('microsoft')
MSFT-->>MES: Microsoft session (or null)
end
alt Has Microsoft session
rect rgb(200, 230, 201)
MES->>PM: POST token → classify + eligibility
Note over PM: Validate token, inspect tid claim
PM-->>MES: { accountType, eligible, reason }
end
alt Entra ID account (tid ≠ MSA tenant)
rect rgb(165, 214, 167)
MES-->>GMS: ✅ Eligible (EntraID)
end
else MSA account (tid = 9188…6dad) — fall through to Path 3
Note over PM: Path 3 — VSS check (server-side)
rect rgb(255, 243, 224)
PM->>Ev4: POST GetEntitlements (service-to-service)
Ev4-->>PM: entitlements array
PM->>PM: Filter qualifying subscriptionLevelCode
end
alt Active qualifying VSS subscription found
rect rgb(255, 224, 178)
MES-->>GMS: ✅ Eligible (VisualStudioSubscription)
end
else No qualifying subscription
rect rgb(255, 205, 210)
MES-->>GMS: ❌ Ineligible
end
end
end
else No Microsoft session
rect rgb(255, 205, 210)
MES-->>GMS: ❌ Ineligible (no accounts)
end
end
end
Note over GMS: Final UI decision
alt Eligible
rect rgb(200, 230, 201)
GMS->>Viewlet: Available
Viewlet->>User: Show marketplace extensions
end
else RequiresSignIn (no accounts at all)
rect rgb(255, 249, 196)
GMS->>Viewlet: RequiresSignIn
Viewlet->>User: "Sign in to access Extensions Marketplace"
User->>Viewlet: Clicks sign-in
Viewlet->>User: Quick pick: GitHub / Microsoft
end
else Ineligible
rect rgb(255, 205, 210)
GMS->>Viewlet: AccessDenied
Viewlet->>User: "Try signing in with a different account"
end
end
Loading
Color key:
Color
Meaning
🔵 Blue
Path 1 — GitHub / GHE eligibility
🟢 Green
Path 2 — Entra ID eligibility
🟠 Orange
Path 3 — VSS entitlement check
🟡 Yellow
Requires sign-in (prompt state)
🔴 Red
Ineligible / access denied
When user is not signed in to either GH / MSFT, how does user knows which account to pick if we show both options so that user gets access to the Private Marketplace?
This is something that would have to come from the user's administrator. If the user is unsure and randomly picks one, and it doesn't provide access, then they are prompted to try a different authentication method. So, if they try EntraId first and it doesn't provide access then they can try again with GitHub, or vice versa.
We could allow the Admin to push a specific provider through the Enterprise policies.
This is something that would have to come from the user's administrator. If the user is unsure and randomly picks one, and it doesn't provide access, then they are prompted to try a different authentication method. So, if they try EntraId first and it doesn't provide access then they can try again with GitHub, or vice versa.
I think the user should have a deterministic behaviour here meaning we should show the account that user can use to get the marketplace info rather than asking user to do a try / check approach.
Regarding the enterprise policy decision — I'd defer to Harald Kirschner (@digitarald) on whether an additional policy is the right mechanism.
From a product perspective, the key requirement is: when the user needs to sign in, VS Code should tell them which account to use — not ask them to guess. If the policy configuration indicates which auth provider(s) the marketplace accepts, the sign-in UX can show only the valid option(s) directly.
Given that this information can be made available, could you revisit the design with that in mind? Specifically:
If we know upfront which provider the configured marketplace accepts, do we still need a separate MarketplaceEligibilityService? Or can the existing GalleryManifestService handle this with the provider info from the policy?
The current 3-path waterfall (GHE → Entra → VSS) assumes we don't know which path will work. If we do know, the design can be significantly simpler.
I've updated the plan to reflect the changes. Assuming that we can provide the recommended auth provider to use, whether it is from a policy or not, but the plan is written using a policy.
Michael Cummings (MSFT) (@mcumming) Thanks for revising the plan — the direction looks good. The policy-driven provider routing and the simplified GalleryManifestService integration are much cleaner than the original 3-path waterfall.
A couple of things to address before implementation:
trustedExtensionAuthAccess in product.json — I don't think this change is needed since GalleryManifestService is workbench code, not an extension calling through the extension host. But TylerLeonhardt knows this area best — can you confirm?
Caching & air-gapped scenarios — The eligibility check result from the Private Marketplace should be cached in storage so the marketplace works on reload even when connectivity is unavailable (air-gapped deployments, transient network issues). On startup, use the cached result immediately but validate it in the background. The cache should be invalidated on session change or sign-out. Take a look at DefaultAccountService — it implements a similar caching pattern that you can follow.
Caching & air-gapped scenarios — The eligibility check result from the Private Marketplace should be cached in storage so the marketplace works on reload even when connectivity is unavailable (air-gapped deployments, transient network issues). On startup, use the cached result immediately but validate it in the background. The cache should be invalidated on session change or sign-out. Take a look at DefaultAccountService — it implements a similar caching pattern that you can follow.
TylerLeonhardt, if I can get an answer on the trustedExtensionAuthAccess in product.json change being required or not, that would be great.
Harald Kirschner (@digitarald), if you could answer if an additional policy is the right mechanism, or offer a better alternative, that would be much appreciated.
Harald Kirschner (@digitarald), if you could answer if an additional policy is the right mechanism, or offer a better alternative, that would be much appreciated.
👋 Not all marketplaces will require authentication, right? Could the marketplace negotiate what kind of authentication it expects? I'm thinking like how WWW-Authenticate headers declare a 'realm' on a 401.
We do this in the dev containers CLI to talk to OCI (container) registries behind auth. I think MCP registry auth follows this standard similarly.
Apologies that I'm catching up a bit here - but is that at all feasible? It would prevent org admins from needing to explicitly set another policy, which feels like a win.
Thanks for the request and the detailed design work. Microsoft Entra ID access for a policy-configured Private Marketplace was implemented in 3d7597c via #325331: administrators can select microsoft with extensions.gallery.authProvider, and eligible work/school sessions activate the configured marketplace. The additional authenticated-index negotiation is tracked separately in #325412, so this request can be closed as completed. The fix shipped in 1.137.0.
Activity
seaniyer commentedon Dec 1, 2025
FYI Isidor Nikolic (@isidorn)
mcumming commentedon Mar 2, 2026
Plan: Entra ID & Visual Studio Subscription Eligibility for Private Marketplace
Overview
The Private Marketplace currently only allows access via GitHub Enterprise / Copilot sign-in, blocking enterprise customers who use Microsoft Entra ID or Visual Studio Subscriptions. This plan adds two new eligibility paths — Entra ID and Visual Studio Subscription — alongside the existing GitHub path.
A new enterprise policy field (
extensions.gallery.authProvider) tells VS Code which auth provider the configured marketplace accepts.GalleryManifestServicereads this policy and routes to the correct auth flow — either the existing GitHub/GHE path or a new Microsoft path. When the user needs to sign in, VS Code tells them exactly which account to use based on the policy — no picker, no guessing. Account classification and subscription checks happen server-side on the Private Marketplace — the VS Code client never parses tokens.Eligibility Matrix
Key Architecture Decisions
extensions.gallery.authProviderpolicy field ('github'or'microsoft')GalleryManifestServiceProposal
Eligibility Check Flow
GalleryManifestServicecaches the access result inIStorageServiceand checks it before contacting any auth provider. If a cache hit exists, the result is applied immediately (marketplace available without delay) and the provider-specific check runs in the background. Both flows benefit equally.Startup (cache-first):
GalleryManifestServicereads theextensions.gallery.authProviderpolicy and routes to one of two flows:GitHub provider (
authProvider='github'or unset — existing behavior, unchanged):GalleryManifestService→DefaultAccountService.getDefaultAccount()checkAccess(account)— enterprise flag or Copilot SKU matchMicrosoft provider (
authProvider='microsoft'— new):GalleryManifestService→IAuthenticationService.getSessions('microsoft', scopes)RequiresSignIn("Sign in with your Microsoft account")tidclaim:Auth Flow: Microsoft Provider
sequenceDiagram participant User participant Viewlet as Extensions Viewlet participant GMS as GalleryManifestService participant Storage as IStorageService participant Auth as IAuthenticationService participant PM as Private Marketplace User->>Viewlet: Open Extensions Viewlet->>GMS: getExtensionGalleryManifest() GMS->>Storage: Read cached access result Storage-->>GMS: Cached result (or null) alt Cache hit GMS->>Viewlet: Apply cached status immediately Note over GMS: Background validate via auth provider end Note over GMS: Policy says authProvider = 'microsoft' GMS->>Auth: getSessions('microsoft', scopes) Auth-->>GMS: Microsoft session (or null) alt No session (auth service responded) GMS->>Storage: Clear cache GMS->>Viewlet: RequiresSignIn Viewlet->>User: "Sign in with your Microsoft account" User->>Viewlet: Clicks sign-in Viewlet->>Auth: createSession('microsoft', scopes) Auth-->>GMS: Session available (via onDidChangeSessions) end GMS->>PM: POST /eligibility (Bearer token) Note over PM: Validate token, inspect tid claim Note over PM: Entra → eligible Note over PM: MSA → check VSS entitlements PM-->>GMS: { eligible, reason } GMS->>Storage: Cache definitive result (200 OK only) alt Eligible GMS->>GMS: Fetch gallery manifest GMS->>Viewlet: Available Viewlet->>User: Show marketplace extensions else Ineligible GMS->>Viewlet: AccessDenied Viewlet->>User: "Your account does not have access" end alt Network/server error Note over GMS: Keep existing cache — never invalidate on transient errors endAuth Flow: GitHub Provider (unchanged)
When
authProvideris'github'(or unset), the existing flow is preserved exactly:GalleryManifestService→DefaultAccountService.getDefaultAccount()→checkAccess(account).No changes to the GitHub path.
Sign-In UX
The sign-in prompt tells the user exactly which account to use, based on the
authProviderpolicy — no provider picker needed.The sign-in command reads the policy and routes directly:
authProvider === 'microsoft'→authenticationService.createSession('microsoft', scopes)commandService.executeCommand(DEFAULT_ACCOUNT_SIGN_IN_COMMAND)(existing GitHub flow)UX Messages
Caching & Air-Gapped Support
The access result is cached in
IStorageService(StorageScope.APPLICATION,StorageTarget.MACHINE) and sits above provider routing, following the same pattern asDefaultAccountService. Both GitHub and Microsoft flows read from and write to the same cache. This ensures the marketplace works on reload even when connectivity is unavailable.Behavior:
Cache is invalidated when (auth service responses only):
onDidChangeSessions('microsoft')— auth service reports session added, removed, or changedonDidChangeDefaultAccount— auth service reports GitHub account changed or removedgetSessions()returns empty array — auth service confirms no sessions exist (sign-out)authProviderorserviceUrlCache is NOT invalidated when:
getSessions()throws (auth service itself is unavailable)Policy Configuration
Modify:
src/vs/workbench/contrib/extensions/browser/extensions.contribution.tsextensions.gallery.authProviderpolicy-controlled configuration (string enum:'github'|'microsoft')Modify:
src/vs/platform/extensionManagement/common/extensionGalleryManifest.tsExtensionGalleryAuthProviderConfigKeyconstantGallery Manifest Integration
Modify:
src/vs/workbench/services/extensionManagement/electron-browser/extensionGalleryManifestService.tsIAuthenticationServiceandIStorageServiceto constructor DIdoGetExtensionGalleryManifest()— readextensions.gallery.authProviderto choose GitHub or Microsoft pathhandleGitHubAccess()andhandleMicrosoftAccess()cache their results on successgetCachedAccess()/cacheAccess()/clearCachedAccess()— provider-agnostic, persist inIStorageServicecheckAccessresultcheckMicrosoftEligibility()— HTTP POST; throws on non-200 (server errors are not cacheable)onDidChangeSessions('microsoft')/onDidChangeDefaultAccount— clear cache and re-evaluatemarketplaceAuthProvidercontext key from policy valueExtensions UI
Modify:
src/vs/workbench/contrib/extensions/browser/extensionsViewlet.tsmarketplaceAuthProvidercontext keyModify:
src/vs/workbench/contrib/extensions/browser/extensions.contribution.tsauthProviderpolicy, routes to correctcreateSessioncall)Modify:
src/vs/workbench/contrib/extensions/common/extensions.tsmarketplaceAuthProvider(string, set from policy)Product Configuration
Modify:
product.json— addmicrosofttotrustedExtensionAuthAccess:The
microsoftentry reserves the key for future extension-based callers. Since the eligibility service runs in the workbench (main process), it may not need explicit trust — but this should be verified during implementation by testing whethergetSessions('microsoft')returns sessions without a trust prompt.Open Questions / Dependencies
subscriptionLevelCode/subscriptionChannelcombinations (coordinate with Aaron Mast / Chee Seong Ong)StorageScope.APPLICATION) above provider routing. On startup, the cached result is applied immediately before any auth or network calls. Background validation runs through the provider flow when connectivity is available. Cache is only invalidated by auth service responses, never by network errors.mcumming commentedon Mar 4, 2026
TylerLeonhardt, Isidor Nikolic (@isidorn)
digitarald commentedon Mar 30, 2026
Sandeep Somavarapu (@sandy081) could you please help with a plan review, so Michael Cummings (MSFT) (@mcumming) has confidence that their approach is on the right track.
sandy081 commentedon Apr 16, 2026
Michael Cummings (MSFT) (@mcumming) Thanks for the proposal. Lets discuss the flow / steps one by one to see if we are covering all scenarios and going in the right direction.
I like that you want to show sign in when user does not have access to private marketplace. How do you detect that? Lets say if user is already signed into GH.com / MSFT or both with Private Marketplace configured - how do you determine if the user has access to the Private Marketplace or not?
When user is not signed in to either GH / MSFT, how does user knows which account to pick if we show both options so that user gets access to the Private Marketplace?
mcumming commentedon Apr 16, 2026
Sandeep Somavarapu (@sandy081)
This is how the Extension view works today, but without the added EntraID auth. I describe the updated flow here:
The new
MarketplaceEligibilityServicesits between theGalleryManifestServiceand the auth providers, evaluating eligibility across three independent paths before the manifest service makes its access decision.%%{init: {'theme': 'base', 'themeVariables': { 'background': '#ffffff', 'primaryTextColor': '#212121', 'lineColor': '#37474f', 'labelBoxBkgColor': '#ffffff', 'labelBoxBorderColor': '#37474f', 'labelTextColor': '#1a237e', 'signalColor': '#37474f', 'signalTextColor': '#0d47a1', 'noteBkgColor': '#e3f2fd', 'noteBorderColor': '#1565c0', 'noteTextColor': '#0d47a1', 'actorBkg': '#e8eaf6', 'actorBorder': '#3949ab', 'actorTextColor': '#1a237e', 'activationBkgColor': '#c5cae9', 'activationBorderColor': '#3949ab', 'sequenceNumberColor': '#ffffff' }}}%% sequenceDiagram participant User participant Viewlet as Extensions Viewlet participant GMS as GalleryManifestService participant MES as MarketplaceEligibilityService participant DAS as DefaultAccountService participant GitHub as GitHub Auth Provider participant MSFT as Microsoft Auth Provider participant PM as Private Marketplace participant Ev4 as Ev4 Entitlement API User->>Viewlet: Open Extensions Viewlet->>GMS: getExtensionGalleryManifest() GMS->>MES: checkEligibility() Note over MES: Path 1 — GitHub/GHE rect rgb(227, 242, 253) MES->>DAS: getDefaultAccount() DAS-->>MES: IDefaultAccount (or null) end alt GitHub account eligible rect rgb(187, 222, 251) MES-->>GMS: ✅ Eligible (GitHubEnterprise / CopilotSKU) end else No GitHub access — fall through to Path 2 Note over MES: Path 2 — Entra ID rect rgb(232, 245, 233) MES->>MSFT: getSessions('microsoft') MSFT-->>MES: Microsoft session (or null) end alt Has Microsoft session rect rgb(200, 230, 201) MES->>PM: POST token → classify + eligibility Note over PM: Validate token, inspect tid claim PM-->>MES: { accountType, eligible, reason } end alt Entra ID account (tid ≠ MSA tenant) rect rgb(165, 214, 167) MES-->>GMS: ✅ Eligible (EntraID) end else MSA account (tid = 9188…6dad) — fall through to Path 3 Note over PM: Path 3 — VSS check (server-side) rect rgb(255, 243, 224) PM->>Ev4: POST GetEntitlements (service-to-service) Ev4-->>PM: entitlements array PM->>PM: Filter qualifying subscriptionLevelCode end alt Active qualifying VSS subscription found rect rgb(255, 224, 178) MES-->>GMS: ✅ Eligible (VisualStudioSubscription) end else No qualifying subscription rect rgb(255, 205, 210) MES-->>GMS: ❌ Ineligible end end end else No Microsoft session rect rgb(255, 205, 210) MES-->>GMS: ❌ Ineligible (no accounts) end end end Note over GMS: Final UI decision alt Eligible rect rgb(200, 230, 201) GMS->>Viewlet: Available Viewlet->>User: Show marketplace extensions end else RequiresSignIn (no accounts at all) rect rgb(255, 249, 196) GMS->>Viewlet: RequiresSignIn Viewlet->>User: "Sign in to access Extensions Marketplace" User->>Viewlet: Clicks sign-in Viewlet->>User: Quick pick: GitHub / Microsoft end else Ineligible rect rgb(255, 205, 210) GMS->>Viewlet: AccessDenied Viewlet->>User: "Try signing in with a different account" end endThis is something that would have to come from the user's administrator. If the user is unsure and randomly picks one, and it doesn't provide access, then they are prompted to try a different authentication method. So, if they try EntraId first and it doesn't provide access then they can try again with GitHub, or vice versa.
We could allow the Admin to push a specific provider through the Enterprise policies.
sandy081 commentedon Apr 22, 2026
I think the user should have a deterministic behaviour here meaning we should show the account that user can use to get the marketplace info rather than asking user to do a try / check approach.
mcumming commentedon Apr 22, 2026
To do that, we could add an additional Enterprise policies to set which provider to use. Acceptable, or do you have other ideas?
sandy081 commentedon Apr 22, 2026
Regarding the enterprise policy decision — I'd defer to Harald Kirschner (@digitarald) on whether an additional policy is the right mechanism.
From a product perspective, the key requirement is: when the user needs to sign in, VS Code should tell them which account to use — not ask them to guess. If the policy configuration indicates which auth provider(s) the marketplace accepts, the sign-in UX can show only the valid option(s) directly.
Given that this information can be made available, could you revisit the design with that in mind? Specifically:
MarketplaceEligibilityService? Or can the existingGalleryManifestServicehandle this with the provider info from the policy?mcumming commentedon Apr 22, 2026
I've updated the plan to reflect the changes. Assuming that we can provide the recommended auth provider to use, whether it is from a policy or not, but the plan is written using a policy.
sandy081 commentedon Apr 23, 2026
Michael Cummings (MSFT) (@mcumming) Thanks for revising the plan — the direction looks good. The policy-driven provider routing and the simplified
GalleryManifestServiceintegration are much cleaner than the original 3-path waterfall.A couple of things to address before implementation:
trustedExtensionAuthAccessinproduct.json— I don't think this change is needed sinceGalleryManifestServiceis workbench code, not an extension calling through the extension host. But TylerLeonhardt knows this area best — can you confirm?Caching & air-gapped scenarios — The eligibility check result from the Private Marketplace should be cached in storage so the marketplace works on reload even when connectivity is unavailable (air-gapped deployments, transient network issues). On startup, use the cached result immediately but validate it in the background. The cache should be invalidated on session change or sign-out. Take a look at
DefaultAccountService— it implements a similar caching pattern that you can follow.mcumming commentedon Apr 23, 2026
Sandeep Somavarapu (@sandy081) Updated the plan to use caching.
TylerLeonhardt, if I can get an answer on the
trustedExtensionAuthAccessinproduct.jsonchange being required or not, that would be great.Harald Kirschner (@digitarald), if you could answer if an additional policy is the right mechanism, or offer a better alternative, that would be much appreciated.
mcumming commentedon Apr 28, 2026
TylerLeonhardt and Harald Kirschner (@digitarald) any thoughts?
joshspicer commentedon May 4, 2026
👋 Not all marketplaces will require authentication, right? Could the marketplace negotiate what kind of authentication it expects? I'm thinking like how
WWW-Authenticateheaders declare a 'realm' on a 401.We do this in the dev containers CLI to talk to OCI (container) registries behind auth. I think MCP registry auth follows this standard similarly.
Apologies that I'm catching up a bit here - but is that at all feasible? It would prevent org admins from needing to explicitly set another policy, which feels like a win.
sandy081 commentedon Oct 21, 2026
Thanks for the request and the detailed design work. Microsoft Entra ID access for a policy-configured Private Marketplace was implemented in 3d7597c via #325331: administrators can select
microsoftwithextensions.gallery.authProvider, and eligible work/school sessions activate the configured marketplace. The additional authenticated-index negotiation is tracked separately in #325412, so this request can be closed as completed. The fix shipped in 1.137.0.