# SSO Connection methods: activate, deactivate

URL: /code/sdk/sso-connection/verbs · Id: `page:code/sdk/sso-connection/verbs`

> The SSO Connection Verbs activate, deactivate as typed SDK methods, with inputs, result, refusals and an example.

Reference for [SSO Connection](/business/nouns/sso-connection), one group of [SSO Connection methods](/code/sdk/sso-connection).

### SSOConnection.activate
Activate turns an SSO Connection on after a test sign-in passes, so the Tenant’s people sign in through it. [Verb page](/business/nouns/sso-connection/activate?interface=sdk).

```ts
interface SSOConnectionVerbs {
  activate(input: SSOConnectionActivateInput, options?: SB.CallOptions): SB.Call<SSOConnection>
}
```

Emits [`SSOConnection.activated`](/business/events/SSOConnection.activated).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `connection` | [SSO Connection](/business/nouns/sso-connection) | Yes | The SSO Connection to turn on. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `connection` | [SSO Connection](/business/nouns/sso-connection) | Yes | The SSO Connection, now active. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const connection = await $.SSOConnection.activate({ connection: 'sso_gFlPhZJ7A7' })
```

### SSOConnection.deactivate
Deactivate turns an SSO Connection off, so nobody signs in through it; its configuration is kept. [Verb page](/business/nouns/sso-connection/deactivate?interface=sdk).

```ts
interface SSOConnectionVerbs {
  deactivate(input: SSOConnectionDeactivateInput, options?: SB.CallOptions): SB.Call<SSOConnection>
}
```

Emits [`SSOConnection.deactivated`](/business/events/SSOConnection.deactivated).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `connection` | [SSO Connection](/business/nouns/sso-connection) | Yes | The SSO Connection to turn off. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `connection` | [SSO Connection](/business/nouns/sso-connection) | Yes | The SSO Connection, now `inactive`. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const connection = await $.SSOConnection.deactivate({ connection: 'sso_gFlPhZJ7A7' })
```