Delete a permission set assignment
DELETE/permission-set-assignments/:id
Revokes an assignment: the principal stops seeing the role through Prism, and the assignment record is removed.
Deleting does not undo creating. Where POST reaches into the member
account and cuts an IAM role, this operation makes no AWS call at all. It
unbinds the role from the user or group in the identity provider and
deletes Prism's row. The IAM role itself, and every policy attached to
it, stays behind in the AWS account. The principal can no longer assume
it by signing in through Prism, but the role remains in the account, still
assumable by anything else that is entitled to, and it will still be there
if the same permission set is assigned to the same account again later.
Delete it in AWS yourself if it has to be gone.
Everything this operation does is synchronous, so unlike POST the
response reflects a finished state rather than a started one.
Unbinding the role in the identity provider is nonetheless best-effort: if that step fails it is logged and the row is deleted anyway, and the call still returns 200. So a 200 guarantees the assignment is gone from Prism, not that the directory binding was cleanly removed.
The operation is not idempotent: a second DELETE of the same id returns
404. And it returns 200 with a body, not 204, where that body echoes
the id rather than the deleted assignment. Read the assignment first if
you need a copy of it.
Request
Responses
- 200
- 401
- 403
- 404
- 500
The assignment was deleted.
Authentication failed: the X-API-Token header was missing, malformed,
expired or not recognised.
This response is text/plain, not JSON. It is written by
http.Error in the authentication middleware, which runs before any
handler and therefore before anything that would build a JSON envelope.
A client that unconditionally JSON-parses response bodies will fail on
this one, so check the status code first.
The token is valid, but it is not allowed to act on this tenant.
An API token is minted inside one tenant and stays bound to it for life.
Sending it to a path whose tenant segment names a different tenant is
refused here, in middleware, before the operation runs, so this says
nothing about the resource you asked for, only about which tenant the
path named. Check the tenant server variable against the console the
token was created in.
No assignment with this id exists in your tenant, so nothing was
deleted. A repeated DELETE lands here, as does an assignment whose
provisioning failed and which Prism has already removed.
The assignment could not be read or could not be deleted. The identity-provider unbinding may already have happened; re-fetch the assignment before deciding what to do.