Adding a service account to a Collab Team or a Group
Abstract
In some case, you maybe want your service account beeing member of a team or a group (to access APIs of theses team/group with your service account token).
This is not possible through the front-end, service account doesn't appears. But you can do it using the API.
Requirement
You need first to create an OIDC client and enable the service account for this client and fetch an access token for this account.
1 - Create your OIDC Client
2 - Enable the service account and get a token
How to
Finally, your just have to refer to the Collab API section Team or Group and use the PUT request to add a user to a team/group
The only thing to know is that the username value for service account is the prefix service-account- followed by the clientId of your oidc client.
Now if you fetch an access token for your service account using scopes team and group, you will see that your service account is member of theses teams/groups and you will be able to use your service account to interact with your collab or you groups through a notebook or any scripts.