Repository navigation
fix(oauth): scope the Microsoft preset to one tenant - #215
Merged
Merged
Conversation
init --oauth now asks for the Microsoft directory (tenant) id, refuses common, organizations and consumers, and writes tenant-specific endpoints.
This was referenced Oct 5, 2026
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.
The Microsoft OAuth preset used the
commonendpoints, which accept a sign-in from any Entra tenant. An application that authenticates its own organization's people should be registered single-tenant and use that tenant's endpoints, which is Microsoft's own guidance for line-of-business apps.Change
https://login.microsoftonline.com/{tenant}/oauth2/v2.0/{authorize,token}init --oauthasks for the directory (tenant) id when Microsoft is chosen. It accepts a GUID or a verified domain (contoso.onmicrosoft.com) and refusescommon,organizationsandconsumersREPLACE_WITH_MICROSOFT_TENANT_IDplaceholder and reported as pending, the same as a missing client idseamless help initmentions the tenant promptProjects scaffolded before this still point at
common. The changeset tells them to replace it with their tenant id inOAUTH_PROVIDERS.Checks
tsc --noEmit,npm run build, and the suite: 1027 passed, 4 skipped (8 new tests for the catalog, tenant validation and the prompt). Minor changeset.Docs: fells-code/seamless-auth-docs#47.