# Your team and your clients

_For tartan 0.9.36._

Your people live in your own organization.

Your people live in your own organization. Each client organization trusts your sign-in groups, so your team works in every client with one passkey and one approved computer.

Below, your outsourced IT organization is `acme` and a client is `northgate`. Your organization signs in with Microsoft Entra
([SSO with Entra](sso-entra.md), for its consent, assignment and check; its trust rules are for a company's own staff, and
yours are the three below); the client trusts your Entra groups, never your people one by one.

## 1. Set up your team in your own organization

Make three groups in your Entra tenant and give them roles in `acme`:

- **Tartan Techs:** `viewer` in your own organization, and `tech` in each client that trusts the group.
- **Tartan Admins:** `viewer` in your own organization, and `admin` in each client that trusts the group.
- **Your management group:** `admin` in your own organization, and nothing in your clients.

A Viewer in your own organization manages clients without being able to change your organization. Only the people
who run `acme` itself go in the management group. The whole path: [Stand up your outsourced IT org](outsourced-it.md). Invite each person to `acme`
([Invite people](invite-people.md)). Each person's computer is approved once, by an Admin of `acme`, and that
approval counts in every client organization where they hold a role.

## 2. Hand each client three values

Give the client's Owner or Admin:

- your issuer: `https://login.microsoftonline.com/<your tenant id>/v2.0`
- Tartan's app id, from your own SSO setup
- your group's object id

## 3. The client trusts your group

The client's Admin adds the rule in their organization. A rule that grants `admin` needs the client's Owner.
`northgate`'s Admin's passkey approves it (the Owner's, for an `admin` rule).

```sh
tartan idp trust add --org northgate --issuer https://login.microsoftonline.com/<your tenant id>/v2.0 --client_id <Tartan's app id> --claim groups --value <Tartan Techs object id> --role tech --dry-run
tartan idp trust add --org northgate --issuer https://login.microsoftonline.com/<your tenant id>/v2.0 --client_id <Tartan's app id> --claim groups --value <Tartan Techs object id> --role tech
```

In the client's console: **Settings** › **Sign-in trust** › **Add a rule**. The client sees your people as a count
on that rule, not as a list: your provider decides who is in the group.

## 4. Your team opens the client

A session's list of organizations is fixed at sign-in, so each person signs in again and finds the client in it:

```sh
tartan login
tartan me show
```

Someone who stays signed in sees the client under `others` and opens it with their passkey instead:

```sh
tartan session add --to northgate
```

In the console: **Switch org**. To reach the client's network, a tech connects for the job:
[Techs, just in time](techs-just-in-time.md).

## When someone leaves

Remove them from your Entra group, or from the app's assignment. Their next write in any organization is refused.

The client keeps its own controls: it is told the first time a new outside tech computer connects, it can block one
person's computer with `tartan tech revoke --org northgate --kid <kid> --user <user id>`, and it can end the trust
with `tartan idp trust remove --org northgate --rule <rule id>`.

## Check it worked

- `tartan me show` lists `northgate` with your role there.
- `tartan idp trust list --org northgate` shows the rule.
- `tartan people list --org northgate` shows one line for the rule, with the count of your people.

## Next

- [Add a client org](add-client-org.md)
- [Techs, just in time](techs-just-in-time.md)
- [SSO with Entra](sso-entra.md)
