Skip to content

Rename app create tenant audience option#2889

Merged
heyitsaamir merged 1 commit into
mainfrom
cli/sign-in-audience-naming
Jun 15, 2026
Merged

Rename app create tenant audience option#2889
heyitsaamir merged 1 commit into
mainfrom
cli/sign-in-audience-naming

Conversation

@heyitsaamir

@heyitsaamir heyitsaamir commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Renames the tenant audience switch to make the CLI surface more explicit.

Why:
single-tenant and multi-tenant are overloaded terms and hid the actual Entra app setting. --sign-in-audience myOrg|multipleOrgs maps more directly to the product concept.

Interesting bits:

  • Replaces --single-tenant with --sign-in-audience <audience>.
  • Supports myOrg and multipleOrgs; default is still multipleOrgs.
  • Removes product-specific flag details from AGENTS.md.

Tips for reviewers:
Start in packages/cli/src/commands/app/create.ts; the rest is tests/docs.

Testing:

  • npm -w @microsoft/teams.cli run test -- app-command-validation.test.ts
  • npx turbo build --filter=@microsoft/teams.cli

Copilot AI review requested due to automatic review settings June 15, 2026 20:47
@heyitsaamir heyitsaamir force-pushed the cli/sign-in-audience-naming branch from 0e0eea1 to df82f86 Compare June 15, 2026 20:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Renames the teams app create tenant audience flag to make the CLI surface align with Microsoft Entra’s signInAudience concept while keeping a friendly, non-Graph enum interface.

Changes:

  • Replaces --single-tenant with --sign-in-audience <audience> (myOrg | multipleOrgs, default multipleOrgs).
  • Adds upfront validation (pre-auth) + coverage for invalid --sign-in-audience values.
  • Updates CLI docs and removes the old flag detail from AGENTS.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
teams.md/docs/cli/commands/app/create.md Updates public CLI docs/examples to the new --sign-in-audience flag.
packages/cli/tests/app-command-validation.test.ts Updates existing test to new flag and adds pre-auth validation coverage for invalid values.
packages/cli/src/commands/app/create.ts Implements new option parsing/validation and maps myOrg/multipleOrgs to Entra signInAudience values.
packages/cli/AGENTS.md Removes mention of the old --single-tenant mapping detail.
Comments suppressed due to low confidence (1)

packages/cli/src/commands/app/create.ts:103

  • [NIT] Consider trimming --sign-in-audience before validation so accidental whitespace (e.g. myOrg ) doesn't produce a confusing validation error.
  .action(

Comment thread packages/cli/src/commands/app/create.ts Outdated

@nickwalkmsft nickwalkmsft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, just realize I never actually left an Approve on this, least I could do 😁

@heyitsaamir heyitsaamir force-pushed the cli/sign-in-audience-naming branch 2 times, most recently from 850d209 to 83f644f Compare June 15, 2026 22:26
@heyitsaamir heyitsaamir requested a review from Copilot June 15, 2026 22:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread packages/cli/src/commands/app/create.ts Outdated
Comment thread packages/cli/src/commands/app/create.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@heyitsaamir heyitsaamir merged commit c90630a into main Jun 15, 2026
4 checks passed
@heyitsaamir heyitsaamir deleted the cli/sign-in-audience-naming branch June 15, 2026 23:26
heyitsaamir added a commit that referenced this pull request Jun 15, 2026
Renames the tenant audience switch to make the CLI surface more
explicit.

Why:
`single-tenant` and `multi-tenant` are overloaded terms and hid the
actual Entra app setting. `--sign-in-audience myOrg|multipleOrgs` maps
more directly to the product concept.

Interesting bits:
- Replaces `--single-tenant` with `--sign-in-audience <audience>`.
- Supports `myOrg` and `multipleOrgs`; default is still `multipleOrgs`.
- Removes product-specific flag details from `AGENTS.md`.

Tips for reviewers:
Start in `packages/cli/src/commands/app/create.ts`; the rest is
tests/docs.

Testing:
- `npm -w @microsoft/teams.cli run test --
app-command-validation.test.ts`
- `npx turbo build --filter=@microsoft/teams.cli`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants