Skip to main content
With Teams installed, your team talks to the Morada OS assistant without leaving Microsoft Teams: in the personal chat with the app, or by mentioning the app in a team’s channel. Each person uses their own Morada OS account, with the same access and the same credits as in the chat, and nothing is done without the OK of whoever asked. See what it looks like for the people who use it. This page is for whoever administers the organization in Morada OS. It takes about 15 minutes, and you do it all on your own, with no one from Morada on a call.
This is not the Microsoft 365 connector. The connector, in Conectores (Connectors), lets the assistant read your email, calendar, files and Teams as you, from inside Morada OS. This is the opposite direction: Morada OS becomes an app inside your company’s Teams, and people talk to it there. Neither depends on the other.

Before you start

  • An Azure subscription on the company’s Microsoft account. The bot lives in your Azure, and the free Azure Bot plan (F0) is enough.
  • Permission to create resources in Azure and to register applications in Microsoft Entra. If your company restricts that, ask whoever administers Azure.
  • Someone with the Teams administrator role (or global administrator) in Microsoft 365, to send the app to Teams in step 4.
  • The organization’s icon, if you want the app to use it: it comes from Configurações (Settings), Identidade (Identity), in Morada OS.
The app belongs to your company: the bot is registered in your Azure, under the name you choose, and only serves people from your organization in Microsoft 365.
The command uses the morada-os-teams resource group by default. This group holds the bots created by every run of the command in the same subscription, including other installations. Do not delete the group while any of these apps is in use in Teams. To remove one bot, delete only that bot’s resource.

Step by step

Click the button with your initials at the bottom of the sidebar, open Configurações > Conta > Canais (Settings > Account > Channels), choose Microsoft Teams and open the Administração (Administration) tab. Only organization administrators see this tab.
Canais in the Conta section of Settings, with Slack and Microsoft Teams cards showing each account connection status
The Administração tab shows five steps in order when the channel has not been installed yet. Keep that page open in a tab: you come back to it between steps.
The numbers in the images match the steps on this page.
1

Name the app

In Nome do app no Teams (App name in Teams), write how the app will appear in Teams, up to 30 characters. By default, it is the assistant’s name in Morada OS.If the organization has more than one workspace in Morada OS, also choose Onde ficam as conversas do Teams (Where Teams conversations live): the workspace that receives the conversations of anyone who has not picked another one in their own preferences.Click Salvar e continuar (Save and continue).
The Microsoft Teams page at step 1, with the Nome do app no Teams field and the Salvar e continuar button marked
You see: step 1 with a ✓ and the app’s name and step 2 open.
2

Register the bot in Azure

3

Azure credentials

4

Send the package to Teams

The package is the app’s file for Teams: it carries the name, the organization’s icon and the bot’s application ID.
Step 4 of the Teams page, with the Baixar o pacote, Abrir o centro de administração do Teams and Já enviei o pacote buttons and the Link do app no Teams (opcional) field marked
  1. Click Baixar o pacote (Download the package). You see: a .zip file in your downloads folder. Do not open or unzip it.
  2. Click Abrir o centro de administração do Teams (Open the Teams admin center) and sign in with a Teams administrator account. In Teams apps, Manage apps, click Actions and Upload new app. On some screens, Upload new app shows directly, without the Actions menu.
    The Actions menu open in Manage apps, with Upload new app marked
  3. Click Upload and choose the .zip you downloaded. You see: the New app added window. Click this link to open the app’s page.
    The New app added window, with this link marked
  4. Choose who can use it. On the app’s page, open the Users and groups tab and click Edit availability. In Available to, choose everyone, specific users or groups, or no one, and click Apply.
    The app's page in the Teams admin center, with the Users and groups tab and the Edit availability button marked
    The Edit availability panel, with the Available to field marked
    Guests from other companies do not use the app, even if they are on the list.
  5. Back in Morada OS, click Já enviei o pacote (I sent the package). You see: step 4 with a ✓ and step 5 open. If you reload the page, step 4 stays done.
  6. Optional: paste the app link. In Teams, open Apps, find the app, click Share and copy the link. In step 4 of Morada OS, paste it in Link do app no Teams (opcional) (App link in Teams, optional) and click Salvar o link (Save the link). With it, Morada OS shows Abrir no Teams (Open in Teams) to everyone, including people who have not added the app yet, and that button goes straight to the app’s page in Teams. If the app does not show for you in Teams yet, paste the link later: the field stays in step 5 and, after the install, sits in the Administração tab under Link do app no Teams. You can also ask in the Morada OS chat: “save this Teams app link”, with the link in the same message.
Teams can take a few hours to show a new app to people. An availability change takes up to 24 hours and, in rare cases, up to six days. Sending the package from Teams itself, outside the admin center, only works if the organization’s policy allows uploading custom apps.
5

Send the app a message in Teams

  1. In step 5, click Abrir no Teams (Open in Teams), if you saved the app link in step 4. Without the link, open Teams, go to Apps and search for the app by name.
  2. Click Add. You see: Added successfully!. Click Open and send any message in the chat with the app. After adding it, Abrir a conversa no Teams (Open the chat in Teams), in step 5, also goes straight to that chat.
    The Teams window after adding the app, with the Open button and the channel list marked
  3. Go back to Morada OS. You do not need to click anything: step 5 shows Esperando o Teams avisar o Morada OS. (Waiting for Teams to tell Morada OS) and moves on by itself when Teams reports the app was added.
    Step 5 of the Teams page, with the Abrir no Teams and Abrir a conversa no Teams buttons and the Esperando o Teams avisar o Morada OS notice
A new app can take a few hours to show up in Teams and to answer, up to 24 hours. Teams releases the app to each person on its own schedule: it may answer some colleagues within a few hours and another person, even the one who sent the package, only much later, with nothing to change in Morada OS or in Teams. Meanwhile, the Teams store may show Request approval instead of Add: do not click it, because it sends a request to the administrators. Wait and try again later.
You see: the app’s health in the Administração tab instead of the steps (see Check that everything is fine). If Teams already reported the app was added but no message has arrived yet, the page shows O Teams avisou que o app foi adicionado. (Teams reported the app was added) with the same buttons. In Teams, the app shows a Conectar minha conta button that opens the Microsoft Teams page in Canais.
Instead of each person adding the app, you can install it for everyone, or for the people and groups you choose, from the Teams admin center:
  1. In Teams apps, Manage apps, open the app’s page.
  2. Open the Users and groups tab, then Installs, and click Install app.
  3. Choose who to install it for and click Apply. The app also becomes available to those people, with no other step.
The install can also take hours to show up in each person’s Teams.

After installing: tell your team

  • Each person connects their own Teams account, once, before the app answers them. It is in Configurações > Conta > Canais > Microsoft Teams (Settings > Account > Channels > Microsoft Teams), with Conectar minha conta (Connect my account). Until then, the app does not use the AI or spend credits: it only shows the person a card with a Conectar minha conta button that opens the Microsoft Teams page in Canais. That goes for you too.
    Microsoft Teams page with the Conectar minha conta button marked
  • The app recognizes each person by their Microsoft account’s email. Whoever is going to use it needs a Morada OS account with that same email. Invite anyone who does not have one yet.
  • To use it in a channel, someone adds the app to the team. In Teams, in Apps, open the app, pick a channel under Select a channel and confirm. When adding it, Teams shows what the app can do, including reading the messages in the team’s channels: the app only reads the conversation where it is mentioned.
  • In a private channel, the app joins channel by channel. The first time someone mentions the app in a private channel, Teams asks whether to add the app to the channel. Click Add. Each private channel asks once.
    The Teams window in a private channel, asking whether to add the app to the channel, with the Add button marked
  • Channels shared with other companies are not served yet.
Send your team the page Use Morada OS in Teams: it explains how to connect, talk and approve.

Check that everything is fine

After the installation, the Administração (Administration) tab of the Microsoft Teams page, in Canais, shows the app’s health:
The Microsoft Teams page with the Ativo badge and the Eventos, Último erro, Onde está, Pessoas, Nome do app and Bot rows
For organization administrators, the Instalação da organização (Organization installation) badge on the card in Canais sums up the situation: Below the table are Nome (Name) (or Nome e workspace, Name and workspace), Endereços do bot (Bot addresses), Pacote do app (App package), Link do app no Teams (App link in Teams) and Trocar o segredo do cliente (Change the client secret). If you change the app’s name, download the package again and send it to Teams.
You can also ask in the Morada OS chat: “is Teams installed? is everything fine with it?”. The assistant reads the same situation the page shows and says what to do.

When Morada OS asks for a new package

To use the app in group chats, keep the package up to date. When the Administração (Administration) tab shows a newer package, download it and upload it again in the Teams admin center, following the steps below. When Morada OS starts needing something new from Teams, the page shows O pacote do app mudou. (The app package changed.) and the card in Canais shows Precisa de atenção (Needs attention) for organization administrators.
The O pacote do app mudou notice, with the Baixar o pacote and Já enviei o pacote buttons marked
1

Download the new package

Click Baixar o pacote, in the notice.
2

Send it as a new version

In the Teams admin center, in Manage apps, open the app and click Upload file, under New version, on its page. People who already use the app keep it, and the availability you chose still applies.
3

Tell Morada OS

Back in the Administração tab of Microsoft Teams, in Canais, click Já enviei o pacote. You see: the notice goes away and the installation returns to Ativo (Active) on the card in Canais.

Recreate a bot deleted from Azure

Administração tab on the Teams page, with Reparar o bot no Azure marked
If the Azure Bot or its resource group was deleted, open Configurações > Conta > Canais > Microsoft Teams > Administração (Settings > Account > Channels > Microsoft Teams > Administration) in Morada OS and, under Reparar o bot no Azure (Repair the bot in Azure), click Gerar o comando (Generate the command). Run the command in Azure Cloud Shell, in Bash mode, using an account that owns the app registration and the subscription where the bot should live. The command keeps the installation’s existing application ID and tenant. It recreates the resource group, Azure Bot and Microsoft Teams channel when they are missing. It also creates a new secret, and removes previous secrets created by Morada OS only after the OS verifies and stores the new one. Other applications’ secrets are not removed. The command expires after 30 minutes and works once. Generating another command invalidates the previous one. When it finishes, send the app a message in Teams to check its reply. If your account does not own the app registration, ask an existing owner to run the command or add you as an owner. If the app registration itself was deleted, remove Teams and install it again.

Remove Teams

To take the Teams app out of your organization, for example to install it again from a clean start, open Configurações > Conta > Canais > Microsoft Teams > Administração (Settings > Account > Channels > Microsoft Teams > Administration) in Morada OS, open Remover o Teams (Remove Teams) and click Remover o Teams da organização (Remove Teams from the organization). Morada OS asks you to confirm before it removes anything. When you confirm:
  • The app stops answering in Teams for everyone in the organization.
  • Morada OS deletes the credentials it kept for the app.
  • The conversations stay in Morada OS.
  • To use Teams again, an organization admin makes a new installation, and each person connects their account again.

What is left to delete outside Morada OS

Morada OS has no access to your company’s Azure or Teams admin center. After the removal, the Administração tab shows what is left, with the installation’s IDs filled in. The notice stays on the page until someone starts a new installation.
1

Delete the bot and the app registration in Azure

Copy the command from the page and run it in Azure Cloud Shell, in Bash mode, with an account in the installation’s tenant and in the subscription where the bot is.The command deletes only what the setup command created for this installation:
  • the installation’s Azure Bot, when it uses the installation’s application;
  • the app registration the setup command created, with its service principal;
  • the bot’s resource group, when it is empty and the setup command created it.
The command does not delete:
  • an Azure Bot that uses another application;
  • an app registration created by hand in the Azure portal (the command shows the link so you can delete it there);
  • a resource group that still holds other resources or that the setup command did not create;
  • anything in Teams.
Before deleting, the command shows what it will delete and what it will keep, and asks you to confirm. If it stops halfway, run the same command again: it deletes only what still exists. The deleted app registration stays in Deleted applications in Microsoft Entra for 30 days and can be restored in that time.If you registered the bot in the Azure portal, without the command, delete the Azure Bot and the app registration in the portal.
2

Delete the app in Teams

In the Teams admin center, open the app’s page and choose More commands (…) > Actions > Delete. The Morada OS page has a direct link when it knows the app; otherwise, find the app under Teams apps > Manage apps.Teams can keep showing the app for a few hours after it is deleted.

When something goes wrong

Morada OS can no longer sign in to Microsoft as the bot, which happens, for example, when the client secret expires or is deleted in Azure. Nobody gets answers in Teams until you fix it. Create a new secret in Certificates & secrets, in the bot’s app registration, and paste the value in Trocar o segredo do cliente, on the Teams page.
Check that the app is still added to the team or chat and that the package sent to the Teams admin center is the latest one.
A new app can take a few hours to show up, and an availability change takes up to 24 hours (in rare cases, up to six days). Check, in the Teams admin center, that the app is on the Manage apps list and that its availability includes the people looking for it. If the Teams store shows Request approval, do not click it: wait for Teams to release the app.
Teams has not told Morada OS yet, and with a new app that can take a few hours, up to 24 hours, and the time varies from one person to another. Check that the bot’s Messaging endpoint, in Azure, matches the one in Morada OS (in Ver os endereços do bot, See the bot’s addresses, at step 2), that the Microsoft Teams channel is connected to the bot, and that someone has already added the app in Teams. The page moves on by itself when the notice arrives.
The chat with the app can show up in someone’s list only because the app was added to a team. What the person writes there does not reach the app until they add it for personal use: Teams shows a banner at the top of the chat with an Add app button (Adicionar aplicação in Portuguese). Ask them to click it and send the message again. With a new app, Teams may also not have released the app to that person yet: wait up to 24 hours.
The Microsoft Teams page, in Canais, says why. If it is A Microsoft não concluiu a conexão. (Microsoft did not complete the connection.), check that the Morada OS URI de redirecionamento is registered on the Web platform, in Authentication, in the bot’s app registration. The other reasons are in Connect your account.
The notice says why. If it is the organization’s icon, upload the icon again in Configurações, Identidade, and download the package again.
Check that the app was added to the channel’s team, that the person connected their account, and that the channel is not shared: the app does not answer in shared channels yet. In a private channel, the app needs to be added to that channel itself: Teams asks about it on the first mention.