Skip to content

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

Merged
royklo merged 41 commits into
mainfrom
api-drift/2026-11-10-0922
Nov 26, 2026
Merged

royklo merged 41 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
royklo and others added 9 commits November 24, 2026 13:53
… and write conflicts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…osoft's label wording

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Thai calendar sent a year 543 too high and a Finnish or Danish time
format sent dots instead of colons, in audit event, threat and indicator
searches and in a scheduled automatic reply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e user id

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…never retry a search

A mailbox change still queued after 5 minutes was only a warning, so a
licence removal in the same call could run before the mailbox was shared.
A POST search only reads, so a 409 there is not retried.

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

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

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 was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@royklo

royklo commented Nov 24, 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/45447675442 (private repository)

…ir own branch

Threat detection and response ships in a later release than the user, group
and mailbox cmdlets, so the two cmdlets, their tests, views and docs leave
this branch. They continue on feature/tdr, which restores this commit.

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

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 was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@royklo

royklo commented Nov 25, 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/45633346729 (private repository)

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

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 was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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

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 was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

royklo and others added 3 commits November 26, 2026 15:53
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eated mailbox permission once

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

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 was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@royklo
royklo marked this pull request as ready for review November 26, 2026 15:02
@royklo
royklo merged commit 023e78b into main Nov 26, 2026
3 checks passed
@royklo
royklo deleted the api-drift/2026-11-10-0922 branch November 26, 2026 15:08
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