Microsoft Teams

Put CADCoPilot in the tool your engineers already have open all day. Teams is the most involved channel to set up — an Entra ID app registration plus an Azure Bot resource — but the least work for end users afterwards.

New to channels? Read Channels & Messaging first for the overall picture. This page is the complete Teams walkthrough.

This one needs your IT admin. Creating an app registration in Microsoft Entra ID and an Azure Bot resource requires directory and subscription permissions that an ordinary user does not have. Budget an hour with someone who has them, plus the time to get the app package approved for your Teams tenant.

The connection at a glance

Teams never talks to CADCoPilot directly. Your message goes to the Azure Bot Service, which forwards it to our webhook as a signed activity. The bot's own identity — an Entra application — is what proves the message is genuine and identifies your organization.

How a Microsoft Teams message reaches your CAD workstation You chat with the company bot in the Microsoft Teams client. Azure Bot Service forwards the activity to the CADCoPilot server at slash api slash channels slash teams slash messages, carrying a Bot Framework bearer token. The server validates that token against the Bot Framework signing keys, with the audience set to your bot's application id, and uses the same application id to identify your organization. It maps your Entra object id to your CADCoPilot account, checks your plan, then pushes the message over the SignalR relay hub to the tray Agent on your PC, which passes it to the CAD add-in over a local named pipe. The reply is posted back to the conversation using an Entra client-credentials token for the bot application. Microsoft Teams — inbound down the solid line, reply up the dashed line Microsoft Teams client desktop, web or mobile — you chat with the company bot credential: your work account (Entra ID) chat activity Azure Bot Service (Bot Framework) delivers the activity to the bot's messaging endpoint credential: bot app id + client secret (Entra app) HTTPS POST with a Bot Framework bearer token issuer https://api.botframework.com CADCoPilot webhook token validated (audience = your bot app id) → the organization POST /api/channels/teams/messages sender = your Entra object id ChannelRouter — who are you? Entra object id → your CADCoPilot account, then the plan check auto-match on the work identity, or a one-time code pushed to your PC only SignalR relay hub → tray Agent on your PC the Agent connects using your own CADCoPilot sign-in wss://www.cadagent.plmcadutilities.com/hubs/relay local named pipe Your CAD application SOLIDWORKS, Inventor, NX or Solid Edge — launched if not running CADCoPilot_<CAD>_Chat Reply — same path, reversed CAD → add-in → tray Agent → back over the relay hub → matched to your waiting    message (10 minute limit) → posted to the conversation    {serviceUrl}/v3/conversations/    {id}/activities    credential: client-credentials    token for the bot app Teams replies are text only.

Step by step

IT admin Register the app in Microsoft Entra ID

  1. In the Microsoft Entra admin center, go to App registrations → New registration. Name it something recognisable, e.g. CADCoPilot Teams Bot.

  2. For Supported account types, choose Accounts in this organizational directory only (single tenant) unless you have a specific reason not to. No redirect URI is needed — the bot never performs an interactive sign-in.

  3. Register it, then copy the two identifiers from the app's Overview page. Both are GUIDs, and both are identifiers rather than secrets:

    • Application (client) ID — e.g. 7c9e6a41-3f52-4b8d-9a10-5e2f8c4b1d63
    • Directory (tenant) ID — e.g. 2b41d0f7-8c35-4a19-b6e2-9d7f0a3c5182
  4. Go to Certificates & secrets → New client secret. Give it a description and the longest expiry your policy permits.

    Copy the Value column, not the Secret ID. The value is shown once and never again — if you navigate away without copying it, delete the secret and create another.

    Put the expiry date in your calendar. When the secret expires, replies stop being delivered.

IT admin Create the Azure Bot and point it at CADCoPilot

  1. In the Azure portal, create a resource of type Azure Bot.

  2. For Microsoft App ID, choose Use existing app registration and paste the Application (client) ID and, for single-tenant, the Directory (tenant) ID from the previous section. Do not let Azure create a new app — CADCoPilot must hold the secret for the same app the bot runs as.

  3. Once created, open the bot resource → Settings → Configuration and set the Messaging endpoint to exactly:

    https://www.cadagent.plmcadutilities.com/api/channels/teams/messages

    Save. Azure will not accept a plain-HTTP endpoint.

  4. Open Channels on the bot resource and add the Microsoft Teams channel. Accept the terms; no extra configuration is needed.

  5. Make the bot reachable from Teams. Either:

    • use Open in Teams on the Teams channel row for a quick single-user test, or
    • build a Teams app package (a manifest.json with your bot's app id in the bots section, plus a colour and an outline icon), zip it, and upload it in the Teams admin center → Teams apps → Manage apps so everyone in the company can find it.

    A personal-scope bot is enough — CADCoPilot answers in one-to-one chats. Requests from channels and group chats are handled the same way, but the answer is posted back into that conversation, where everyone can read it.

Org admin Save the identifiers in the org portal

  1. Sign in to the org portal as an organization admin and open Messaging Channels.

  2. Fill in the Microsoft Teams (Entra ID) panel:

    • Enabled — ticked (it is by default).
    • Application (client) ID — the bot app's GUID. This is also how CADCoPilot recognises that an incoming activity belongs to your organization, so it must match the bot exactly.
    • Directory (tenant) ID — your Entra directory GUID.
    • Client secret — the Value you copied from Certificates & secrets.
    The Microsoft Teams panel in the org portal with Application ID, Directory ID and client secret fields
    The Teams panel: application (client) ID, directory (tenant) ID, and the client secret.
  3. Press Save. Teams needs no restart: the webhook reads the saved values on every message, so the channel is live as soon as the save completes.

  4. If your users do not sign in to CADCoPilot with their Microsoft work account, leave User self-connect ticked — they will need the one-time code route described below.

Two different app ids will silently do nothing. If the Azure Bot runs as one app registration and the portal holds a different one, the inbound activity matches no organization and is dropped without an error reaching Teams. Copy the id from the bot resource's configuration page, not from a similarly named app.

End user Start chatting

  1. In Teams, find the company's CADCoPilot bot — search for it by name, or open the app your IT admin published, and start a chat.

  2. Send a first message, for example hello.

    • If your CADCoPilot account carries your Microsoft work identity, you are linked automatically — no code, no button. Carry on to the test below.
    • If it does not (for example, you signed up with an email address and password rather than a Microsoft account), the bot replies that the account is not linked. Use the code route in the next step. This is normal, not a fault.
  3. Code route. Open Settings → Messaging Channels in the CAD add-in or the tray Agent status window, press Connect next to Teams, and copy the one-time code — 32 hexadecimal characters, valid for 30 minutes, single use.

    The Messaging Channels section of the add-in Settings dialog showing the per-channel status rows
    Settings → Messaging Channels in the CAD add-in, showing which channels are enabled for your company and whether you are connected.
  4. Paste that code into the Teams chat with the bot, on its own, and send it. The bot replies:

    “Linked! You can now drive your CAD from here.”

End user Your first test message

Make sure the tray Agent is running and connected on the workstation you want to drive, then:

What CAD applications are running on my PC?

Then something that builds geometry:

Create a new part and make a 50 mm cube

And verify the result rather than trusting the wording:

What is the volume of the current part?
A Microsoft Teams conversation with the CADCoPilot bot showing a modelling request and the reply
A live Teams conversation with the company bot. Replies are text; screenshots stay on the workstation.
Teams replies are text only. If CoPilot produces a screenshot or a file, it stays on your workstation and the reply describes it. Telegram is the channel that sends pictures back inline.

Exact values

Where What goes in it Format / example
Azure Bot → Configuration → Messaging endpoint The CADCoPilot inbound webhook https://www.cadagent.plmcadutilities.com/api/channels/teams/messages
Portal → Application (client) ID The Entra app the Azure Bot runs as GUID, e.g. 7c9e6a41-3f52-4b8d-9a10-5e2f8c4b1d63. Not secret.
Portal → Directory (tenant) ID Your Entra directory GUID. Used when CADCoPilot requests a token to reply. Not secret.
Portal → Client secret Certificates & secrets → the Value ~40 mixed characters. Secret. Not the Secret ID (that is a GUID and will not work).
User link code (only if not auto-matched) Sent as a Teams message to the bot 32 lower-case hex characters, single use, 30 minutes

Re-saving and rotating the secret

Troubleshooting

Symptom Cause Fix
The bot never replies to anything, not even the link prompt. The Application (client) ID in the portal is not the one the Azure Bot runs as, so no organization is matched. Copy the id from the Azure Bot's configuration page into the portal and save.
Azure reports the messaging endpoint is unreachable, or the bot's test chat errors. The messaging endpoint is wrong, or is not the https URL above. Set it to https://www.cadagent.plmcadutilities.com/api/channels/teams/messages, exactly, and save.
CoPilot clearly ran the command, but no answer appears in Teams. The reply could not be authenticated: the client secret is wrong, expired, or belongs to a different app. Create a fresh client secret on the bot's app registration, paste the Value into the portal, save, and retry.
The bot says the account is not linked, even though you are signed in to Teams with your work account. Automatic matching only works when your CADCoPilot account carries the same Microsoft identity. An account created with an email address and password does not. Use the code route: press Connect next to Teams in the add-in or tray Agent and paste the code into the Teams chat.
The code was pasted but nothing linked. More than 30 minutes had passed, the code was already used, or Teams added formatting around it. Get a fresh code and paste it as plain text on its own line, with nothing else in the message.
Someone else's Teams messages drive your CAD. Your one-time code was pasted from their Teams account, so their Entra identity is linked to your CADCoPilot user. Have them press Connect in their own CADCoPilot and paste their own code — the identity is repointed to them. Never post a link code into a channel or group chat.
“No active CADCoPilot agent found on your PC.” The tray Agent is stopped, or lost its connection after a server restart and its retries ran out. Open the tray Agent, press Stop then Start. Your Teams link is stored in the database and survives.
Users cannot find the bot in Teams. The app package was never published to the tenant, or is blocked by Teams app permission policies. Upload it in the Teams admin center and allow it in the app permission policy that covers those users.
It worked, then stopped months later. The client secret reached its expiry date. Create a new secret, paste the value into the portal, save. Diarise the next expiry.
No screenshot came back. By design — Teams replies carry text only. Use Telegram, or open the CAD chat panel on the workstation.

Security

Related