Skip to main content

Microsoft Teams

Publishes an agent flow as a Teams bot that can message users, be published to a customer's private Teams app catalog, and be installed for named users.

Section 1 covers the Azure artifacts you create outside NeuraFlow, once per bot (NeuraFlow, NeuraFlow HR, NeuraFlow Growth, …). Section 2 is the console setup. Section 3 covers the consent flows the customer's admin must approve.

1. Prerequisites

Five values to collect
  1. Directory (tenant) ID
  2. Application (client) ID
  3. Client secret
  4. Bot handle
  5. Messaging endpoint: {BASE_URL}/api/v1/webhooks/channels/teams/messages

Steps 1.1–1.6 below produce all five.

All of section 1 happens in Microsoft's portals, not in NeuraFlow. Steps 1.1 to 1.5 are in the Microsoft Entra admin center, step 1.6 is in the Azure portal. You need an account that can create app registrations and grant admin consent, normally Application Administrator or Global Administrator.

1.1 Create the app registration

  1. Entra admin center → ApplicationsApp registrationsNew registration.
  2. Name it (this is the display name customers see).
  3. Supported account types: Accounts in any organizational directory (Multi-tenant).
  4. Register, then copy the Application (client) ID and Directory (tenant) ID from Overview.
Multi-tenant is not optional

Single-tenant registrations authenticate only in your own directory. The bot will fail in every customer tenant, and the fix is a new registration.

1.2 Add redirect URIs

AuthenticationAdd a platformWeb, then add both. Each derives from BASE_URL, so register the pair for every environment you run:

{BASE_URL}/api/v1/channels/teams/oauth/callback
{BASE_URL}/api/v1/channels/teams/oauth/catalog/callback

1.3 Add API permissions

API permissionsAdd a permissionMicrosoft Graph. Add only what you need. Catalog and push are optional (see section 3).

PermissionTypeNeeded for
Chat.CreateApplicationMandatory: bot messages users
User.Read.AllApplicationMandatory: resolve users
AppCatalog.ReadWrite.AllApplicationCatalog: server-side catalog checks
AppCatalog.ReadWrite.AllDelegatedCatalog: admin publishes during setup
TeamsAppInstallation.ReadWriteForUser.AllApplicationPush: install for named users
openid, profile, emailDelegatedCatalog: admin sign-in

Then Grant admin consent for your own tenant.

1.4 Create the client secret

Certificates & secretsNew client secret. Copy the Value column immediately. Azure hides it after you leave the blade.

1.5 Verify the publisher

Without publisher verification the customer's consent screen labels the app unverified. With it, it reads Brain Station 23.

1.6 Create the Azure Bot

Create a resourceAzure Bot:

FieldValue
Bot handleYour choice
Type of appSingle Tenant
Creation typeCreate new Microsoft App ID
Microsoft App IDThe Application (client) ID from 1.1
App tenant IDThe Directory (tenant) ID from 1.1
Messaging endpoint{BASE_URL}/api/v1/webhooks/channels/teams/messages
Enable Streaming EndpointYes

Then Channels → add Microsoft Teams.

2. Configuration

Azure credentials are not entered here. They live in the System Configuration and each bot references one.

RoutePurpose
/channels/teamsList the organization's bots
/channels/teams/createCreate a bot
/channels/teams/{id}/editConfigure, authorize and deploy

Create

FieldRequiredPurpose
Bot NameYesPlaceholder My Teams Bot
Agent FlowYesRoutes every incoming message
Azure ConfigurationYesWhich system config to use. Hidden and auto-selected when only one is available

Short and full descriptions are not on this screen. The console posts fixed placeholder text (AI Assistant, AI-powered assistant for your organization) and you edit them afterwards on Bot Configuration.

Create Bot validates client side, then calls POST /channels/teams. On success it navigates to the edit page.

Blocking conditions:

ConditionResult
No organization selectedForm disabled, "Organization Required" banner
No Azure configuration availableCreation blocked, "No Available Configuration" banner
Organization has no agent flowsInline warning linking to /agent-builder/create

Server errors are rewritten before display:

Server message containsToast shown
Azure, tenant or appPlease configure Azure credentials in Settings > Channels > Teams first.
already has a Teams botThis organization already has a bot using this system configuration.
anything elseThe raw server message

Edit

Three tabs: Permissions, Bot Configuration, Deploy.

Permissions

Grants and revokes the three consents from section 3. The tenant shown is read from the system config and is not editable here.

ControlCallsResult
Authorize ChatPOST /channels/teams/oauth/authorizeFull-page redirect to Microsoft
Authorize PushPOST /channels/teams/oauth/push/authorizeFull-page redirect. Disabled until chat is authorized
Sign In (catalog)POST /channels/teams/oauth/catalog/authorizeFull-page redirect
Revoke (chat)POST /channels/teams/oauth/revokeClears consent, refetches status
Revoke (push)POST /channels/teams/oauth/push/revokeClears push consent
Sign Out (catalog)POST /channels/teams/oauth/catalog/revokeClears catalog token
Revoke AllBoth revoke endpoints in sequenceDisabled when neither is authorized

Each consent shows a status badge, its scope badges, and once granted the approving admin and timestamp. Status comes from GET /channels/teams/oauth/consent-info.

Two controls on this tab do not work as labelled

Verify calls GET /channels/teams/{id}/test, which does not exist on the backend. It always fails with "Connection test failed."

Authorize Both writes a teams_authorize_both_{id} flag to sessionStorage intended to auto-continue into push authorization after the chat redirect returns. Nothing reads that flag, so the button needs a second click once you land back on the page.

Bot Configuration

Everything that ends up in the Teams app manifest.

FieldRequiredDefaultManifest target
Bot EnabledNoOnNot in the manifest. Off stops responses without deleting the bot
NameYesPlaceholder NeuraFlow Botname.short (truncated to 30) and name.full
Agent FlowYesnoneNot in the manifest. Selects the answering flow
Short DescriptionNononedescription.short. Hard limit 80, truncated as you type
Full DescriptionNononedescription.full
VersionNo1.0.0version
Accent ColorNo#5558AFaccentColor
Privacy URLTo deploynonedeveloper.privacyUrl. Must be HTTPS
Terms of Use URLTo deploynonedeveloper.termsOfUseUrl. Must be HTTPS
Color IconNonone192x192 PNG
Outline IconNonone32x32 PNG
ControlCallsResult
Color / Outline Icon pickerPOST /channels/teams/{id}/icons/{color|outline}Uploads immediately on file choice, no save step. Shows an "Uploaded" badge
Save ChangesPUT /channels/teams/{id}Saves every field above except icons

A missing or non-HTTPS Privacy or Terms URL raises an inline error and blocks both actions on the Deploy tab.

note

The database column default for Accent Color is #0066CC, but the create API supplies #5558AF and the console never sends the field, so new bots get #5558AF.

Deploy

ControlAvailable whenCallsResult
Push to CatalogCatalog signed in and URLs setPOST /channels/teams/{id}/deployPublishes to the tenant's app catalog, updates deployment status
Download ManifestURLs setGET /channels/teams/{id}/manifestDownloads a .zip for manual upload
Search UsersPush consent grantedGET /channels/teams/{id}/usersPopulates the user dropdown
Push to UserA user is selectedPOST /channels/teams/{id}/push-to-userInstalls the bot for that user
Teams Admin CenterAlwaysnoneOpens the Microsoft admin portal in a new tab

Deployment status is not_deployed, deploying, active or error.

Missing prerequisites replace the relevant control with a banner linking to the tab that fixes it: unset URLs point at Bot Configuration, missing catalog sign-in or push consent point at Permissions. Download Manifest stays available without catalog sign-in, since it only needs the URLs.

3. Other

Three independent consents. Only the first is required. A customer can grant chat alone and still run the bot.

ConsentRequiredScopesEndpoint
ChatYesChat.Create, User.Read.All/{tenant}/adminconsent
CatalogNoAppCatalog.ReadWrite.All, offline_access, openid, profile, email/{tenant}/oauth2/v2.0/authorize?prompt=consent
PushNoTeamsAppInstallation.ReadWriteForUser.All/{tenant}/adminconsent

Chat and push are tenant-wide admin consent: the admin approves once for the whole organization. Catalog is delegated: the admin signs in as themselves and their token is stored, which is why offline_access is in scope and why catalog is the only consent that expires.

Each consent revokes independently.

Getting the bot into Teams

PathRequires
Deploy from NeuraFlow. Publishes to the customer's private catalog, updates in placeCatalog consent
Download manifest .zip, customer uploads it themselvesChat consent only

Deployment errors

MessageFix
Privacy URL is required / must be a valid HTTPS URLSet it on the bot
Terms of Use URL is required / must be a valid HTTPS URLSet it on the bot
Developer Website URL is requiredSystem Configuration (BS23 admin)
Developer Name exceeds 32 charactersSystem Configuration (BS23 admin)
Admin sign-in required. Please authorize catalog permissions firstGrant catalog consent, or use the manual path
Catalog authorization has expiredRe-run catalog consent on the Permissions tab