Skip to content

Entra: read the tenant's licences once and skip the gated steps with one message - #43

Merged
fadwen merged 1 commit into
mainfrom
feat/entra-capabilities
Sep 14, 2026
Merged

fadwen merged 1 commit into
mainfrom
feat/entra-capabilities

Conversation

@fadwen

@fadwen fadwen commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Stacked on #42 (which is stacked on #41).

What

Get-EntraCapability reads /subscribedSkus inside Connect-EntraEnvironment and records Capabilities on the connection: Known, EntraP1, EntraP2 (P2 or Governance), Plans. A plan counts only on an enabled SKU and when provisioned.

New-EntraEnvironment then skips Conditional Access policies without P1 and role eligibilities without P2 with one warning naming the licence and the step, instead of nine policy refusals and three eligibility warnings that each said the same thing in Graph's words. Each skipped step carries a Reason in the result (-Skip ones say so too). -IncludeUnlicensed attempts them regardless.

The rule that keeps this safe: Known = $false (the app could not read the SKUs) means every step runs, as before. The probe can remove noise; it can never remove a step the tenant would have run. The report and the verifier stop asking Graph for eligibilities a tenant without P2 cannot hold, so the one read Graph refuses is never made. Teardown deliberately ignores the probe: a tenant whose P2 lapsed may still hold eligibilities Graph will not show.

Live

Against the lab tenant: Known=True P1=False P2=False, one warning, both steps Skipped with their reasons, the verifier's eligibility warning gone.

Gates

Unit suite 2,623 passed shuffled on 7 (1 skipped) and 2,624 on 5.1, 0 failed. Analyzer clean. New suite Get-EntraCapability.Tests.ps1; a Licence context in New-EntraEnvironment.Tests.ps1; cases in the Entra report and verifier suites. Entra README, CHANGELOG, Tests/README and a CLAUDE.md invariant.

…gated steps with one message

Get-EntraCapability reads the subscribed SKUs when the connection is established and
records Known, EntraP1 and EntraP2 on it. New-EntraEnvironment skips Conditional Access
policies without P1 and role eligibilities without P2, once, with one warning naming
the licence and the step, instead of nine policy refusals and three eligibility warnings
that each said the same thing in Graph's words; each skipped step carries its Reason.
-IncludeUnlicensed attempts them regardless, and a tenant whose SKUs cannot be read
gets every step as before. The report and the verifier stop asking for eligibilities a
tenant without P2 cannot hold. Teardown deliberately ignores the probe.

Verified live against the lab tenant: Known, no P1, no P2; one warning; both steps
Skipped with their reasons; the verifier's warning gone.
Base automatically changed from feat/shared-surface to main September 14, 2026 17:15
@fadwen
fadwen merged commit e0ee5f1 into main Sep 14, 2026
@fadwen
fadwen deleted the feat/entra-capabilities branch September 14, 2026 17:17
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.

1 participant