Repository navigation
Conversation
odgrim
force-pushed
the
track-a/azure-interaction-tenant
branch
from
December 6, 2026 07:48
01831a1 to
4bdfca5
Compare
PluginError::interaction_required takes the target's name. Azure gives the tenant's id and name when: - detection finds no tenant that gives a token, because az's default tenant wants MFA: the default tenant, named as the login names it; - a tenant pinned by domain wants MFA or a new sign-in: the domain; - targets lists a tenant the login holds no account in; - select or a resume chooses a tenant that wants MFA, a new sign-in, or holds no account. Accounts.in_use carries its tenant, so the default tenant is known.
odgrim
force-pushed
the
track-a/azure-interaction-tenant
branch
from
December 6, 2026 16:03
531800c to
33ee5d0
Compare
odgrim
marked this pull request as ready for review
December 6, 2026 16:14
This branch has not been deployed
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.
Change
When the person must sign in to an Azure tenant, Azure's
interactionRequirednow gives the tenant's id and, where known, its name. Runbooks prefills the sign-in form's tenant fromidand showsname, as Runbooks main named the tenant and prefilled "Tenant to sign in to".detectand a freshsignInused to failaccessDeniedwith az's AADSTS text. They now failinteractionRequiredfor az's default tenant, named as the login names it. No session exists afterwards, so Runbooks prefills the sign-in's tenant fromid; asignInToanswersnotSignedIn.interactionRequiredwith the domain asid, whichsignInTotakes.targetsfor a tenant the login holds no account in used to list nothing. It now answersinteractionRequiredfor that tenant, so the person learns it needs a sign-in when they pick it, not after picking None.selectand a resumed choice already answeredinteractionRequiredfor a tenant that wants MFA, a new sign-in, or holds no account. They now name it.Decisions
PluginError::interaction_requiredtakesname: Option<String>. Every caller passes one.runbooks-plugin-transportis not published.Accounts.in_useis anAccount(id and tenant), not a bareSubscriptionId.az account get-access-tokenwithout--tenantuses the default account's tenant. With the tenant in the same value, the tenant can't drift from its account. Callers that need only the id take.id.sign_in_fixes, decides which refusals a sign-in fixes: MFA and a new sign-in. A tenant that denies the login keeps az's error.targetsreusesSession::default_account. That is the checkselectalready makes for a tenant with no account.nameis left out; the domain inidis already readable.Gaps
network, keeping its kind at the default tenant and at a domain pin;signInToafter a failedsignInansweringnotSignedIn.targetscallsSession::default_accountonly for its error.accessDeniedbefore.DisplayNamedrops control characters only, so U+202E and U+2028 reachnameand "Sign in to to use it".interaction_requiredtakesnameas aString, not aDisplayName.targetsfor a tenant id the login can't see at all now answersinteractionRequired, not an empty list. Runbooks asks only for tenantstargetslisted.az_cliproxy tests (an_id_token_request_never_goes_through_the_environments_proxy,a_requested_federated_token_comes_through_the_proxy_onto_stdin) failed once at 10 s in a loaded mutant run. They pass alone in 7 to 10 s, so they sit close to their bound. This change doesn't touch them.Evidence
a_detected_login_needs_a_sign_in_to_the_tenant_that_wants_mfa(new):{"kind": "interactionRequired", "level": "tenant", "id": CONTOSO, "name": "Contoso"};fabrikam.onmicrosoft.comand Fabrikam wanting MFA, the same data with the domain asidand noname;interactionRequiredData.a_tenant_missing_from_the_profile_needs_a_sign_in_to_itnow lists Fabrikam's subscriptions first and getsinteractionRequirednamed "Fabrikam", then the same fromselect.a_tenant_that_refuses_a_token_says_whether_a_sign_in_fixes_itexpects the name.interaction_required_names_the_level_and_target(transport) covers the data with and withoutname.188 passed, 1 failed):targetslisting a tenant with no account;commitleaving its tenant unnamed.az'stenant_ofnow finds a tenant-level account by its tenant id, as az lists one. Without it,a_failed_sign_in_to_puts_back_a_default_its_login_movedlost the default a failed login moved.mise run checkat 4bdfca5:508 tests run: 508 passed, 0 skipped, lint clean, semverno publishable crates.20 mutants: 12 caught, 8 unviable.Audit dependenciesis red, as on main, until the pin-project-lite 0.2.19 lock update.git patch-id --stable(29daf91b875f) and the same changed lines, tree unchanged.