> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nextks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Teams Setup

> Install and configure NextKS for your Microsoft Teams organization.

## Prerequisites

* A Microsoft 365 tenant with Teams enabled
* Admin consent permissions (Global Admin or Teams Admin)

## Installation

<Warning>
  Installation must be performed by a **Microsoft 365 / Teams administrator**. It is a one-time, organization-wide setup that makes NextKS available to every member of your Teams organization.
</Warning>

Installing NextKS is a two-part process: first connect NextKS to your Microsoft 365 tenant, then upload the NextKS app package into Teams so members can use the bot.

### Step 1 — Connect NextKS (admin only)

1. Go to [app.nextks.com/signin](https://app.nextks.com/signin)
2. Click **Add to Microsoft Teams**
3. Sign in with your admin account. On Microsoft's consent page, select **Consent on behalf of your organization**, then click **Accept** to grant admin consent for the whole tenant.
4. You'll be signed in to the NextKS dashboard automatically as the organization admin

<Info>
  Granting consent **on behalf of your organization** authorizes NextKS for every user in your Microsoft 365 tenant, so members don't each get a separate consent prompt. It does **not** yet add the NextKS app to Teams — do that in Step 2.
</Info>

### Step 2 — Upload the NextKS app to Teams (admin only)

NextKS is not distributed through the Microsoft Teams store, so an admin uploads the app package into your organization's Teams app catalog from the **Teams admin center** and installs it for everyone.

<Info>
  **Prerequisite:** custom apps must be allowed for your tenant. In the [Teams admin center](https://admin.teams.microsoft.com), go to **Teams apps → Manage apps → Actions → Org-wide app settings** and, under **Custom apps**, turn on **Let users install and use available apps by default**.
</Info>

1. Download the app package: **[NextKSforTeams.zip](https://app.nextks.com/downloads/NextKSforTeams.zip)**

2. Sign in to the [Teams admin center](https://admin.teams.microsoft.com/policies/manage-apps) and go to **Teams apps → Manage apps**.

3. In the top-right corner, open the **Actions** menu and select **Upload new app**, then choose the **NextKSforTeams.zip** file you downloaded. NextKS is added to your org's app catalog (no separate approval needed).

4. **Install it for everyone:** on the **Manage apps** page, search for and select **NextKS**, choose **Edit installs**, select **All users** (or specific users and groups), and select **Apply**.

   <Info>
     Older tenants that haven't migrated to app centric management won't see **Edit installs**. Instead, go to **Teams apps → Setup policies → Global (Org-wide default)**, under **Installed apps** select **Add apps**, add **NextKS**, and **Save**.
   </Info>

5. Availability and installs can take a few hours to propagate to all members.

## What NextKS needs access to

| Permission                | Purpose                                               |
| ------------------------- | ----------------------------------------------------- |
| Send and receive messages | Deliver notifications and process user input          |
| Create conversations      | Open DM channels with users for notification delivery |
| Read user profile         | Match users by email for notification routing         |

## Logging in (after installation)

Once the workspace is connected, team members log in at [app.nextks.com/login](https://app.nextks.com/login):

1. Click **Log in with Microsoft Teams**
2. Authorize the login in the Microsoft OAuth prompt
3. You're logged in to the NextKS dashboard

New users are created with the `member` role. The original installer is the `admin`.

## Using the bot

After installation, team members can:

* **Search for "NextKS"** in the Teams app bar and start a chat
* **Receive notifications** as DMs from the bot
* **Click Adaptive Card buttons** on interactive notifications

## Adding team members

Users are registered when they first log in, message the bot, or receive a notification via the API. The bot matches users by their Microsoft 365 email address.

## Reconnecting

If you need to update the bot token (e.g., after revoking permissions), an admin can reconnect from **Admin Settings** in the dashboard.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Bot not found in Teams">
    * Confirm an admin completed **Step 2** — uploaded `NextKSforTeams.zip` in the Teams admin center (**Manage apps → Actions → Upload new app**) and installed it via **Edit installs**. The OAuth sign-in alone does not add the bot to Teams
    * After upload/install, the app can take a few hours to propagate to members
    * Admin consent may take a few minutes to propagate
    * Verify the consent was completed successfully in **Admin Settings**
    * Check that your Teams admin hasn't blocked third-party apps
  </Accordion>

  <Accordion title="404 errors on notification delivery">
    * Ensure the recipient's email matches their Microsoft 365 account email
    * The bot needs to create a conversation first — this requires correct tenant configuration
    * Try reconnecting from **Admin Settings** if the issue persists
  </Accordion>

  <Accordion title="Buttons not responding">
    * Adaptive Card interactions require the bot to have correct messaging permissions
    * Try reconnecting the app from **Admin Settings** in the dashboard
  </Accordion>
</AccordionGroup>
