ahlan hamad

Setup guide · Microsoft Teams

Connect Microsoft Teams with your own Azure Bot: step by step

The bot lives in your own Azure subscription and Microsoft tenant, so your organisation owns it and its secret. It takes about twenty minutes and needs an Azure admin who can create resources and app registrations, a Teams admin who can upload apps, and an AhlanHamad admin with settings access — one person can be all three. Every label below is the one you will see on screen.

Updated 12 October 2026

1. Before you start

2. In AhlanHamad: get your messaging endpoint

  1. Go to Integrations → Microsoft Teams and click Start setup.
  2. Copy Your messaging endpoint. It is unique to your company.

The endpoint only tells AhlanHamad which company a message is for. Every message must still carry a token Microsoft signed for your bot's App ID, and must come from your tenant, before anything happens.

3. In Azure: create the bot

  1. In the Azure portal, choose Create a resource, search for Azure Bot and click Create.
  2. Enter a bot handle, subscription and resource group. Under Type of App choose Single Tenant; under Creation type choose Create new Microsoft App ID. Click Review + create, then Create.
  3. Open the new resource and go to Settings → Configuration. Paste your messaging endpoint into Messaging endpoint and click Apply.
  4. On the same page copy the Microsoft App ID and the App Tenant ID.
  5. Next to the Microsoft App ID click Manage Password. Under Client secrets click New client secret, choose an expiry, click Add, and copy the Value right away — Azure shows it once.
  6. Go to Settings → Channels, choose Microsoft Teams, accept the terms and click Apply (Microsoft Learn).

4. In AhlanHamad: connect your bot

  1. Back in Integrations → Microsoft Teams, paste the Microsoft App ID (bot ID), the App Tenant ID (directory ID) and the Client secret value.
  2. Click Connect my bot. AhlanHamad asks Microsoft for a token with these values before saving them, so a typo is caught here.

5. In Teams: upload the app for your organisation

  1. In AhlanHamad click Download Teams app package. The .zip carries your bot's ID, the icons and the Arabic strings.
  2. In the Teams admin center, go to Teams apps → Manage apps and click Upload new app (Microsoft Learn).
  3. So approvers receive cards without installing anything, add the app to a Setup policy (Teams apps → Setup policies → Installed apps) for the people who approve requests (Microsoft Learn).

Members are then matched to employees by their Microsoft sign-in name on a domain you confirm, the same as before. You can change any match in the members table.

How your credentials are kept

6. Troubleshooting

MessageWhat to do
The Microsoft App ID is a GUID like 1a2b3c4d-…. Copy it from the bot's Configuration page.Copy Microsoft App ID from Settings → Configuration, not the bot handle.
Paste the client secret's Value (not its Secret ID).Create a new client secret and copy its Value column.
Microsoft did not accept these values. Check that the App ID, the Tenant ID and the secret belong to the same bot and that the secret has not expired.Check the three values on the bot's Configuration page; if the secret's value is lost, create a new one.
This Microsoft tenant is already connected to another Ahlan Hamad company.Disconnect it from the other company first, or contact us.

When the client secret expires in Azure, cards stop arriving. Create a new secret and paste it under Your bot's endpoint, credentials and app package → Save new credentials.

7. Disconnecting

  1. In AhlanHamad, click Disconnect Microsoft Teams. The stored client secret is deleted and your endpoint stops acting on messages.
  2. In Azure, delete the client secret (or the whole Azure Bot resource), and remove the app in the Teams admin center if you no longer need it.

Microsoft sources used in this guide

About AhlanHamad × Microsoft Teams· All integrations