Skip to main content

Ask from Microsoft Teams

Nexatron answers in Teams as the person who asked, with their own permissions. The Teams bot is a small service your team runs; it talks to Nexatron with one token per person, never a shared account.

Setup has two halves: a Teams admin registers and uploads the app once, then each person links themselves. Unlike the Slack app, the Teams bot must be reachable from Microsoft's servers over HTTPS.

What you need​

  • Rights to create an Azure Bot resource and to upload apps in the Teams admin center (or to sideload for a pilot).
  • A Nexatron account for every person who will ask, with the systems they will ask about connected once under Settings → Connected accounts.
  • Somewhere to run the bot process with a public HTTPS address.

Teams admin: register and upload the app​

  1. In the Azure portal create an Azure Bot (multi-tenant). Note the App ID and the client secret. Set the messaging endpoint to https://<your bot host>/api/messages.
  2. Put the App ID into the Teams app manifest that ships with the bot package (nexatron-teams, file manifest.json), add the two icons, and zip the three files.
  3. In the Teams admin center → Teams apps → Manage apps → Upload new app, upload the zip for an organization-wide install. For a pilot, a user can upload the same zip under Apps → Manage your apps → Upload a custom app.
  1. In Nexatron, open Settings → API tokens and create a token named, for example, Teams. Tick Ask questions. Copy the token; it is shown once.
  2. Give the token and your Microsoft Entra ID object id (your directory user id) to whoever runs the bot. The bot keeps a map of object id to token; that map is what makes every question run as you.

If you ask before you are linked, the bot replies that your account is not linked and runs nothing.

Run the bot​

pip install nexatron-teams # or: uvx nexatron-teams
export MICROSOFT_APP_ID=<app id>
export MICROSOFT_APP_PASSWORD=<client secret>
export NEXATRON_USER_TOKENS='{"<entra object id>":"nxa_..."}'
export NEXATRON_URL=https://api.nexatron.io/api/v1
nexatron-teams

The process exits at startup if the user map is missing.

Using it​

Message the bot directly or mention it in a channel with any question, for example In ServiceNow, how many incidents are in each state? Answers show the result and an Open in Nexatron button for the full view.

Writing back from Teams​

A question that asks for a change comes back as the plan Nexatron would run. Today the Teams bot shows that plan as text; the Confirm and run button is available in Slack and in the web app, so confirm the action there. Nothing is written until it is confirmed.

Troubleshooting​

SymptomCause
"not linked to a Nexatron user"Your Entra object id is not in the bot's map
"We can't reach ServiceNow as you" (or Atlassian)You have not connected that system under Settings → Connected accounts
The bot never answersThe messaging endpoint is wrong or not reachable over HTTPS, or the process exited because NEXATRON_USER_TOKENS is missing