Assigning roles dynamically through api

We have a setup where all users are assigned a default dashboard readonly role, but on-demand they should be able to dynamically acquire a role with further possibilities (system admin or other).

This has to be done through the Api.

I’ve been looking through the SwaggerUI and documentation to find a way to do this, but I haven’t been succesful.

Is it possible to assign and remove a new role through the Api?

Hi @janmolbech

Thanks for getting in touch, and sorry that it has taken so long for me to get back to you.

Just to confirm what you are asking, is it a functional equivalent of sudo, i.e. I am a user and I need immediate escalation, or is it more going to a self service portal where they request further access for there account?

The first option is not possible in Octopus, as we don’t have the concept of dynamic role elevation. The second option could be, however it would take some work to get your there. While I can’t provide too much help here, I would suggest that you would be setting up teams with the appropriate permissions that you need, and then using an API key attached to an administrator account to add and remove users from those teams as needed.

Hopefully that points you in the right direction,

Regards
Alex

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.