github-authentication: skip education.github.com check for EMU accounts - #336608
Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit intoSep 20, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit into
Dmitriy Vasyura (dmitrivMS) merged 1 commit into
Conversation
Managed (EMU) accounts can't access the education.github.com endpoint, so evaluate the EMU heuristic up front and skip the fetch entirely for them, setting edu to 'none'. Telemetry schema is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: TylerLeonhardtMatched files:
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused change correctly avoids the unsupported request without affecting the regular-account path.
Pull request overview
Skips the unavailable GitHub Education lookup for EMU accounts while preserving telemetry behavior for regular accounts.
Changes:
- Detects managed accounts from their login.
- Avoids the EDU request for managed accounts and reuses the detection result for telemetry.
File summaries
| File | Description |
|---|---|
extensions/github-authentication/src/githubServer.ts |
Adds the managed-account EDU lookup short circuit. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced (auto)
Note
Copilot is running an experiment and ran this review at Balanced.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
TylerLeonhardt
approved these changes
Sep 19, 2026
TylerLeonhardt
left a comment
Member
There was a problem hiding this comment.
Thanks for contributing!
Vijay Upadya (vijayupadya)
approved these changes
Sep 19, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Sep 20, 2026
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
September 20, 2026 13:58
Abdon Morales (abdonmorales)
pushed a commit
to abdonmorales/vscode-utcs
that referenced
this pull request
Sep 23, 2026
…ts (microsoft#336608) Managed (EMU) accounts can't access the education.github.com endpoint, so evaluate the EMU heuristic up front and skip the fetch entirely for them, setting edu to 'none'. Telemetry schema is unchanged. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit ac717e6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #327377
Reopens #327379, which GitHub auto-closed when its head fork was deleted — the head repository no longer resolves, so that PR can't be reopened. Same commit, rebased onto current
main.Enterprise Managed User (EMU) accounts can't access
https://education.github.com/api/user, socheckUserDetailsalways fails that fetch for them and falls through toedu = 'unknown'after a wasted network round trip and a log line on every sign-in.The EMU signal was already computed in this method —
session.account.label.includes('_'), used for theisManagedtelemetry property. This hoists it above the fetch and skips the request entirely for managed accounts, settingedu = 'none', then reuses the same value for telemetry instead of recomputing it.Telemetry schema is unchanged:
isEduandisManagedare still reported with the same values for non-managed accounts.How to test
student/faculty/none, orunknownwhen the endpoint errors).<idp-username>_<shortcode>) — no request to education.github.com, log showsSkipping optional EDU details check for a managed account., telemetry reportsisEdu: none,isManaged: true.