4

Our Stack Overflow Teams users are authenticated via SSO (SAML). Is it possible to have an integration to deactivate or delete accounts in Stack Overflow Teams, when the user leaves our company?

I checked the API, but it doesn't have many endpoints to write data and it doesn't have any way to update or delete users, as far as I can see.

Is there another way? It would be weird, when users can create user accounts automatically, but when they leave someone has to deactivate them manually.

1 Answer 1

2

It is possible to deactivate / activate through SCIM. Either your system is already capable of SCIM or you can set up some simple REST calls.

You have to activate SCIM 2.0 Integration in Stack Overflow Teams and generate a token. The token is used as a bearer token in the HTTP calls.

  1. Get the user by email address:

    GET https://stackoverflowteams.com/c/[your team]/auth/scim/v2/Users?filter=userName eq "[email address]"

  2. Read the users "id" from the result (Ressources[0].id).

  3. Update the users "active" ressource:

    PATCH https://stackoverflowteams.com/c/dev-photon/auth/scim/v2/Users/[user id]

with body

{
    "Operations": [{
        "op": "replace",
        "value": {
            "active": true -or- false
        }
    }]
}

Not the answer you're looking for? Browse other questions tagged .