'How do I revoke user-generated API tokens in Foundry?

Is there a way to programmatically revoke all user-generated tokens for a service user?

I saw some endpoints in the Multipass internal API, but from my understanding those are locked down for FE use. This is for killing off restricted tokens in the break-the glass-case, or when we kill off a connection to a remote system.



Solution 1:[1]

If this is just for one-off break-the-glass scenario, feel free to use internal APIs. You probably want the getTokens and revokeToken endpoints.

Reminder: Restricted tokens are not user-generated tokens. And restricted tokens should have very short lifetimes (ideally 1 hour or less) so revoking them shouldn’t really be a concern.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ataheri