Skip to content

fix: API change (2026-11-10-0922) - #50

Draft
royklo wants to merge 17 commits into
mainfrom
api-drift/2026-11-10-0922
Draft

royklo wants to merge 17 commits into
mainfrom
api-drift/2026-11-10-0922

Conversation

@royklo

@royklo royklo commented Nov 10, 2026

Copy link
Copy Markdown
Owner

API change detected

An hourly check follows the inforcer API specs that this module uses, for beta and v1. It found a change that the module may need to follow. This pull request is where the module gets updated for it.

What to do

  1. Open the run summary to see exactly which endpoints and schemas changed, with the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/42790140146
    (The summary is in a private repository.)
  2. Update the cmdlets on this branch for those changes.
  3. Merge only after the production-ready label is set. That label means the change is live for everyone, so the module can safely use it.

What you will see on this pull request

  • API change: the API changed again. A comment tells you, with a link to what changed.
  • Change is live: part or all of the changes went live. This branch gets an updated copy of the live API spec (docs/openapi-snapshot*.json), and the comment tells you whether this pull request is ready.
  • Ready to merge: everything is live. The production-ready label is added. Finish the module changes, merge, and publish.
  • Not ready to merge anymore: a new change came in after the label was set. The label is removed until that change is live too.

An hour in which nothing changes gives no comment.

@royklo royklo added the api-drift API schema drift label Nov 10, 2026
Copilot AI balanced review requested due to automatic review settings November 10, 2026 09:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

@royklo
royklo marked this pull request as draft November 10, 2026 10:10
The v1 API adds POST /tenants/{msTenantId}/users and PATCH
/tenants/{msTenantId}/users/{userId}. Both cmdlets need an API client
login; an API-key (beta) session stops with RequiresApiClient because
beta has no equivalent.

New-InforcerUser sends the required fields with safe defaults (sign-in
enabled, password change at first sign-in, mail alias from the UPN) and
returns the new id with the tenant, display name and UPN so it pipes
into Set-InforcerUser. The password goes only into the request body.

Set-InforcerUser sends only the parameters that were passed (JSON Merge
Patch); '' or an empty array clears a field, and the four fields the API
cannot clear refuse an empty value. Users pipe in by id.

Invoke-InforcerApiRequest now treats 204 as success without output and
adds a problem+json results[] list to the error text, so a partly
applied update says which step failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
royklo and others added 2 commits November 10, 2026 12:21
A failed web call keeps the disposed request on its ErrorRecord, and
the disposed body's bytes stay in memory, reachable by reflection: for
New-InforcerUser that is the initial password. Clear-InforcerRequestCredential
already strips the auth headers from that request; it now also zeroes the
body bytes, so every request path is covered. The regression test fails
without the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@royklo

royklo commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Change is live (v1)

Changes to the v1 API went live since the previous hourly check. The copy of the live API spec on this branch (docs/openapi-snapshot*.json) has been updated to match. You do not need to do anything for that.

Not ready to merge yet

Part of the changes is live, the rest is not live yet.

What to do: nothing for now. Keep building on this branch, but do not merge. A new comment follows when everything is live.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/42806811168 (private repository)

Copilot AI balanced review requested due to automatic review settings November 10, 2026 11:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request. Copilot's per-file or total diff limits were exceeded. Try reducing the changed content or splitting the changes into smaller pull requests, then request a review from Copilot again.

@royklo

royklo commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/42833227501 (private repository)

Copilot AI balanced review requested due to automatic review settings November 10, 2026 14:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

A maintainer must verify the new POST/PATCH user contracts and production readiness because the checked-in OpenAPI snapshot contains only GET operations and the linked private API-change run is unavailable.

No open issues 🎉

Review effort: Balanced

@royklo

royklo commented Nov 11, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/43002908084 (private repository)

@royklo

royklo commented Nov 11, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/43067362929 (private repository)

Set-InforcerUser gets -Password (with -ForceChangePasswordNextSignIn) and
-RevokeSessions. One call runs profile update, password reset and sign-out
in that order; a failing step stops the rest and the error says what was
already done and what was not (UserUpdatePartlyApplied).

Get-InforcerUser -UserId -IncludeAuthenticationMethods attaches the user's
registered sign-in methods as authenticationMethods.

Both need an API client login. The docs now also say that a GET can show
the old values for up to about five minutes after a change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 19:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The private API-change run is inaccessible and the checked-in snapshot lacks the new user-management endpoints, requiring maintainer validation of their contracts, permissions, and production readiness.

No open issues 🎉

Review effort: Balanced

@royklo

royklo commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/43199637519 (private repository)

Set-InforcerUser -RemoveAuthenticationMethod takes one or more method ids
from Get-InforcerUser -IncludeAuthenticationMethods and deletes them. In
one call it runs after the password reset and before the sign-out, so a
compromised account can be locked out in a single command. A refused
method stops the remaining steps and the error names what was and was not
done (UserUpdatePartlyApplied).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 11:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The private API-change run is inaccessible and the checked-in v1 snapshot lacks the new user-write and authentication-method endpoints, requiring maintainer confirmation of their contracts and production-readiness gate before merge.

No open issues 🎉

Review effort: Balanced

-ResetMfa deletes every sign-in method that can be deleted in one request,
in the order Microsoft Entra needs, so the user must register MFA again;
the password is kept. It runs after the password reset and before the
sign-out, so a compromised account is locked out in one command.

When some methods were refused, the error now names each method by type
and id with its outcome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 15:45
Copilot AI balanced review requested due to automatic review settings November 17, 2026 12:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Mailbox conversion sequencing can remove Exchange licensing before conversion succeeds, either after a polling timeout or during a combined licence swap, risking mailbox deprovisioning.

3 open issues

Review effort: Balanced

Comment on lines +481 to +482
$licenceFirst = [bool]$AddLicense
if ($licenceFirst) { $steps.Add('change licences') }
$request = @{ Endpoint = "$userEndpoint/mailbox/$($call.Path)"; Method = $call.Method }
if ($call.Body) { $request['Body'] = $call.Body }
$action = Invoke-InforcerApiRequest @request @errorHandling
if (-not $stepErr) { $action = Wait-InforcerMailboxAction -UserEndpoint $userEndpoint -ActionId $action.actionId -Step $step -UserId $UserId @errorHandling }
@royklo

royklo commented Nov 17, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44091911862 (private repository)

@royklo

royklo commented Nov 17, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44102309501 (private repository)

@royklo

royklo commented Nov 17, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44125211012 (private repository)

Set-InforcerUser gets -GrantCalendarAccess/-RemoveCalendarAccess and
-AllowMailApp/-BlockMailApp (one change for all apps), and New-/Set-InforcerUser
get -UserType (Member or Guest). Get-InforcerUser -IncludeMailbox now includes
who the calendar is shared with, and the mailbox's mail apps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 09:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Timeout handling and mixed licence swaps can remove the Exchange licence before shared-mailbox conversion completes, risking mailbox disconnection.

4 open issues

Review effort: Balanced

try {
while ($status -notin 'succeeded', 'failed') {
if ((Get-Date) -ge $deadline) {
Write-Warning "The request to $Step for user $UserId is still $status after $TimeoutSeconds seconds. Exchange Online carries on in the background (action id $ActionId)."
@royklo

royklo commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44284667259 (private repository)

…cerUser

-AddGroup and -RemoveGroup change a user's Microsoft Entra group memberships.
Adding runs first and removing only after every add succeeded, so a user moved
between groups is never left in neither.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 11:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Critical sequencing and timeout-handling flaws can remove a required Exchange licence before shared-mailbox conversion is confirmed, defeating the offboarding safeguard.

4 open issues

Review effort: Balanced

@royklo

royklo commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44369007189 (private repository)

…eArchive

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 19:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Mailbox timeouts are treated as completion, and combined licence changes can run before conversion, allowing Exchange licence removal before mailbox conversion succeeds.

4 open issues

Review effort: Balanced

@royklo

royklo commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44487430243 (private repository)

@royklo

royklo commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44495851629 (private repository)

@royklo

royklo commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44514053747 (private repository)

@royklo

royklo commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44542987247 (private repository)

@royklo

royklo commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

Change is live (v1)

Changes to the v1 API went live since the previous hourly check. The copy of the live API spec on this branch (docs/openapi-snapshot*.json) has been updated to match. You do not need to do anything for that.

Not ready to merge yet

Part of the changes is live, the rest is not live yet.

What to do: nothing for now. Keep building on this branch, but do not merge. A new comment follows when everything is live.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44553920043 (private repository)

Copilot AI balanced review requested due to automatic review settings November 19, 2026 15:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Critical sequencing and timeout-handling flaws allow licence removal before mailbox conversion is confirmed successful, risking mailbox disconnection and failed preservation.

4 open issues

Review effort: Balanced

@royklo

royklo commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

API change (v1)

The v1 API changed since the previous hourly check.

What to do: open the details link below to see which endpoints or schemas changed. If the module uses them, update the cmdlets on this branch. Merge only when the production-ready label is set.

Details, with which endpoints and schemas changed and the diff: https://github.com/royklo/Powershell-Module-Automation/actions/runs/44752677761 (private repository)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-drift API schema drift

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants