Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require a specific tenant for confidential clients #348

Closed
chlowell opened this issue Aug 31, 2022 · 2 comments · Fixed by #394
Closed

Require a specific tenant for confidential clients #348

chlowell opened this issue Aug 31, 2022 · 2 comments · Fixed by #394
Labels
enhancement New feature or request GA

Comments

@chlowell
Copy link
Collaborator

Also, just FYI / for context, both in client_credentials flow and in OBO flow, calls should not be made over "common" / "organizations".

  • in client_credentials we should outright ban it, because "common" is only supposed to work with user flows
  • in OBO, if you've got a multi-tenant app, the tenant should be incomming_assertion.tid

Originally posted by @bgavrilMS in #343 (comment)

The confidential.Client constructor confidential.New() doesn't require an authority and "common" is its default tenant. We could make calling New() without an authority argument a runtime error but making it a compile-time error requires a new constructor.

@chlowell chlowell added the enhancement New feature or request label Aug 31, 2022
@bgavrilMS
Copy link
Member

Not that you can change the tenant id when making the request, you cannot throw in the confidential ctor. You can only throw after you resolve the tenant id.

@bgavrilMS bgavrilMS added the GA label Feb 3, 2023
@bgavrilMS
Copy link
Member

bgavrilMS commented Feb 3, 2023

I think we should take this for GA.

Note that this validation needs to happen as part of AcquireToken* API, as the CCA object may be configurd with "login.microsoft.com/common" but the modified WithTenant used in the acquire method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GA
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants