Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

The help desk can no longer unlock accounts

Petra, a help desk operator who has been signed in all morning, presses Unlock for Mara and is refused. This lesson reads the refusal for the one permission it names, finds the role edit that removed it, restores only that grant, and checks that a removed permission stops working on the very next request.

The same action now returns a refusal

Mara calls the photo service's help desk at 10:20. After a few wrong guesses on a new laptop, her account is locked, and she has an album to share before lunch. Petra, the help desk operator who takes the call, has had the user list open since she signed in at 08:58. She finds Mara, opens the menu, chooses Unlock and confirms. Instead of the usual green banner, the page says: "This change was refused because your account does not hold a permission it needs." Petra has unlocked dozens of accounts this month. She has not signed out, and nothing on her screen has changed.

She posts in the team channel, and two worries arrive at once. Petra's: "Did something break? I could do this yesterday." And from Sol, the administrator who edited the help desk role that morning: "Hang on. If Petra's page still shows the Unlock button, could a page loaded before an edit keep using powers the role no longer has? I took the password reset permission away on purpose."

Both questions have the same answer, and it is the idea at the center of this incident. A session proves who is making a request. It does not record what that person may do. The server works that out again, from the caller's current role assignments and the permissions those roles hold, every time a request arrives. The button on Petra's page was drawn when she loaded the page at 08:58, and it reflects what her role allowed then. It is a convenience, not a source of authority. What decides is the server's check when she presses it.

Ask about the operation, not the title

Start with the exact request and its exact answer. The page made one call to the identity service's management API, and the browser's network panel or the service's request log shows it:

POST /manage/v1/users/user-5521/unlock HTTP/1.1
Host: auth.photos.example
Cookie: <redacted>

HTTP/1.1 403 Forbidden
Content-Type: application/problem+json
X-Request-ID: e4a1c7d2-58b0-4f93-a6e2-1d9c0b7f3a65

{
  "type": "https://auth.photos.example/problems/missing-permission",
  "title": "Permission required",
  "status": 403,
  "detail": "Your account does not hold the permission this operation needs.",
  "required_permission": "users.unlock"
}

The body uses the problem details format from RFC 9457, which many management APIs use for errors: a type that identifies the kind of problem, a short title, the HTTP status, a human-readable detail, and any extra fields the API defines. This API adds required_permission. The status matters too. A 401 would have meant the service did not accept Petra's session at all, so she would have had to sign in again. A 403 means the service knew exactly who she was and decided she may not do this one thing.

Notice what the answer names: a permission, users.unlock, not a role. Petra holds the help-desk role, and the role still has the same name it had yesterday. A role is a named group of permissions, and its name tells you nothing about what it grants today. Reading a user, unlocking an account, resetting credentials and reading the audit trail are separate operations, each guarded by its own permission, and an edit can remove one while leaving the role looking unchanged.

The audit trail shows both halves of the story. First the refused unlock, found by the request ID:

time        2026-10-19T10:21:03.118Z
operation   users.unlock
outcome     rejected
reason      missing_permission (users.unlock)
actor       user-0347 (Petra Kowalski), session signed in 08:58
roles       help-desk
object      user-5521 (Mara)
request_id  e4a1c7d2-58b0-4f93-a6e2-1d9c0b7f3a65

Then the change that explains it, from earlier that morning:

time        2026-10-19T09:47:12.304Z
operation   roles.update
outcome     succeeded
actor       user-0192 (Sol Ortega)
object      role help-desk
change      removed: users.credentials.reset, users.unlock
            kept:    users.read, users.lock
request_id  71f3b9e0-2c6d-4a18-9e57-c0a4d81b6f29

Sol meant to remove users.credentials.reset. The photo service has moved password resets to a self-service flow, and the help desk should no longer do them. In the role editor, the two permissions sit next to each other, and users.unlock went with it. The edit was legitimate. One permission in it was a mistake.

The same evidence answers Sol's worry. Petra's session started at 08:58, an hour before the edit, and her page still offered Unlock. The server refused anyway, because it checked the role as it stood at 10:21, not as it stood when she signed in. That refusal is the system working. The worrying result would have been the opposite: an unlock that succeeded after the permission was gone.

Not every system behaves this way, and it is worth knowing which kind you run. Some copy a user's roles or permissions into the session, or into a self-contained access token, when the user signs in, and check that copy instead of the current assignments. They honor a removed permission only when the copy expires or is refreshed. That is a deliberate design with a window of staleness, and if your system works like that, the length of the window is part of every revocation. If a service is ever unable to reach its current role data, it should refuse the request, never fall back to whatever the page or the token last said.

A copy from sign-in

Who is asking
Petra, session from 08:58
Operation
users.unlock on user-5521
Roles read from
Session copy, 08:58
help-desk grants users.unlock
Yes

Unlock allowed after removal

The server at 10:21

Who is asking
Petra, session from 08:58
Operation
users.unlock on user-5521
Roles read from
Current role, 10:21
help-desk grants users.unlock
No

403, required_permission users.unlock

After the repair

Who is asking
Petra, session from 08:58
Operation
users.unlock on user-5521
Roles read from
Current role
help-desk grants users.unlock
Yes

Unlock succeeds, same session

The button on the page is a convenience, not a source of authority.

Petra's Unlock, checked three ways. A copy of her roles from sign-in would still allow it; the server checks the role as it stands, which refused it at 10:21 and allows it again after the repair.

Restore only the intended grant

Confirm the job first. Help desk operators are expected to unlock accounts. That is not changing with the move to self-service resets, and the team lead says so in the ticket. So the repair is to put users.unlock back into the help-desk role through the ordinary role editor, and nothing else. users.credentials.reset stays removed, because removing it was the point of Sol's change.

The faster-looking fixes are all wider. Giving Petra the administrator role until things settle would restore unlocking and hand her the power to read the audit trail, edit roles and change other administrators' access. Granting users.unlock directly to each operator's account would scatter authority outside the role, so that the next person to review the help desk role would not see what the help desk can actually do. Restoring the whole role to yesterday's version would bring back password resets, undoing the part of the change that was correct.

The edit itself is a protected operation. Changing what a role contains and assigning a role to someone are guarded by separate permissions, and a well-run system lets an administrator grant only permissions they themselves are allowed to delegate. Petra cannot repair this herself by editing her own role, and that is by design. Administering roles safely covers those limits.

Verify current allowed and denied work

Once Sol has restored the permission, Petra tries again from the same page, without signing out. The unlock succeeds and Mara can sign in. The audit trail now shows a roles.update record adding users.unlock to help-desk, then a successful users.unlock for user-5521 with Petra as the actor. Her session never changed. Only the role did, and the server picked that up on her very next request.

Next, check that the repair did not open anything else. The help desk role never included audit.read, and it still should not. Have Petra request the audit trail directly from the API, not just look for a missing menu item, because a hidden link proves nothing about what the server allows:

GET /manage/v1/audit?operation=users.unlock HTTP/1.1
Host: auth.photos.example
Cookie: <redacted>

HTTP/1.1 403 Forbidden
Content-Type: application/problem+json

{
  "type": "https://auth.photos.example/problems/missing-permission",
  "title": "Permission required",
  "status": 403,
  "detail": "Your account does not hold the permission this operation needs.",
  "required_permission": "audit.read"
}

Password resets should still be refused too, since that removal was intended.

Finally, prove that a revocation takes effect at once, which is what Sol was really asking. Use a test operator account rather than the live help desk: assign it the help-desk role, sign it in, load the user list and lock a test user. Then remove the test account's role assignment and, without reloading the page, press Unlock. The very next request must be refused with a 403 naming users.unlock. If it succeeds, the service is trusting something cached in the session or the page, and that is a far more serious finding than the one you started with.

Worked example: the role change record

A before-and-after view of the role makes the repair easy to review, because it shows that exactly one permission moved:

The help-desk role through the incident
PermissionYesterdayAfter the 09:47 editAfter the repair
users.readGrantedGrantedGranted
users.lockGrantedGrantedGranted
users.unlockGrantedRemoved by mistakeGranted
users.credentials.resetGrantedRemoved on purposeNot granted
audit.readNot grantedNot grantedNot granted

The handoff note records the refused request, the edit that caused it, the one grant restored and the requests that must still be refused:

Symptom:       Help desk operator refused when unlocking a customer at 10:21 UTC, still signed in.
First failure: POST /manage/v1/users/user-5521/unlock returned 403, required_permission users.unlock
               (request e4a1c7d2-58b0-4f93-a6e2-1d9c0b7f3a65).
Cause:         Role edit at 09:47 (request 71f3b9e0-2c6d-4a18-9e57-c0a4d81b6f29) removed
               users.unlock alongside the intended removal of users.credentials.reset.
Repair:        users.unlock restored to help-desk. No other permission or assignment changed.
Verification:  Same operator, same session: unlock succeeds. Reading the audit trail: still 403.
               Password reset still refused. Test operator refused on the first request after
               its role assignment was removed.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

An operator who signed in an hour ago presses Unlock on a page loaded before an administrator removed users.unlock from their role. What should happen? 1 of 3

Choose one answer.

A legitimate role edit removed users.unlock from the help desk role by mistake while removing password resets on purpose. Which repair restores the help desk's work without widening it? 2 of 3

Choose one answer.

Another operator's Unlock request comes back 401 rather than the 403 Petra saw. What does the different status tell you? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity