OAuth via Portainer API

Hey,

we want to use Portainer in our Environment, be we’re using the External Authentication Plugin for OAuth Support.
We’re mostly want to use the Portainer API and therefore we have to authenticate the users via OAuth (KeyCloak Server). But we couldn’t get it working, when we use the OAuth Access Token, we get: “message”: “Invalid JWT token”
But how can we get the JWT Token, for the Access Token?

Any help would higly appreciated, because we’re kind of stuck at this point :slight_smile:

Kind regards,
Jonathan Maier

1 Like

Hi Jonathan,

At the moment, Portainer only delegates authentication to the OAuth provider (here your KeyCloak Server), this means that you need to authenticate through the Portainer API to retrieve the JWT token that you can use to interact in authenticated mode with the API.