TechBuzzPro

How to Integrate Microsoft Teams with Bitbucket

· 5 min read · Apps & Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can integrate Microsoft Teams with Bitbucket by using Bitbucket's built-in Microsoft Teams integration, which sends notifications about repository activity (pushes, pull requests, builds) directly to a Teams channel. This requires a Bitbucket Cloud workspace, a Microsoft Teams team and channel, and admin permissions in both. No coding is needed, but you must be an admin in Bitbucket and have permission to add connectors or apps in Teams.

What You'll Need

  • A Bitbucket Cloud workspace (the integration is not available for Bitbucket Server or Data Center).
  • Admin permissions for the Bitbucket workspace (or at least permission to manage integrations).
  • A Microsoft Teams team and channel where you want notifications to appear.
  • Permission to add connectors or apps in that Teams channel (usually a team owner or member with connector rights).
  • Both services signed in with the same or linked accounts; typically you'll sign in to Bitbucket and then authorize Teams.

Step-by-Step

  1. Open Bitbucket and go to your workspace. Log in to bitbucket.org and select the workspace that contains the repositories you want to monitor.
  2. Navigate to the integrations settings. In the left sidebar, click Settings (or the gear icon) and look for Integrations or Apps. The exact label can vary slightly by Bitbucket version, but it's usually under workspace settings.
  3. Find Microsoft Teams in the list. Scroll through available integrations and click Microsoft Teams. If you don't see it, use the search box or check that you're in a Cloud workspace.
  4. Click “Add” or “Connect”. Bitbucket will prompt you to authorize the connection. You'll be redirected to Microsoft to sign in and grant permissions.
  5. Sign in to Microsoft Teams. Use the Microsoft account that has access to the Teams team and channel you want to use. Accept the permissions request.
  6. Choose the team and channel. After authorization, you'll return to Bitbucket. Select the Microsoft Teams team and the specific channel where notifications should be posted.
  7. Select which events to send. Bitbucket lets you choose event types such as pushes, pull request updates, and build status changes. Enable the ones you care about.
  8. Save the integration. Click Save or Connect to finish. Bitbucket will now send a test message to the channel to confirm it works.
  9. Verify in Teams. Open the chosen channel in Microsoft Teams and look for the test message or a confirmation from Bitbucket. If you see it, the integration is active.
  10. Test with a real event. Push a commit or open a pull request in one of your Bitbucket repositories. Within a minute or two, a notification should appear in the Teams channel.

Common Mistakes

  • Using Bitbucket Server instead of Cloud. The native Microsoft Teams integration is only for Bitbucket Cloud. Server and Data Center users need a different approach (such as webhooks to a custom Teams connector).
  • Not having admin rights. If you can't see the Integrations menu, you likely lack workspace admin permissions. Ask a workspace admin to grant them or perform the setup.
  • Choosing the wrong Teams channel. Notifications go to the channel you select during setup. If you later rename or delete that channel, the integration breaks.
  • Forgetting to authorize Microsoft. Skipping the Microsoft sign-in step means Bitbucket can't post to Teams. Always complete the OAuth flow.
  • Assuming all events are sent by default. You must explicitly enable the event types you want; otherwise you may get no notifications.

Tips

  • Create a dedicated Teams channel (e.g., “Bitbucket Alerts”) to keep repository noise out of general chat.
  • Use Bitbucket's event filters to send only high-value notifications, like pull request approvals or failed builds, to reduce clutter.
  • If you manage multiple repositories, set up the integration at the workspace level to cover all of them at once.
  • Document the integration for your team so everyone knows where to look for build and PR updates.
  • Regularly review the integration settings to ensure the channel still exists and event selections match your team's needs.

Troubleshooting

If notifications don't appear in Teams, work through these checks in order:

  1. Confirm the integration is still connected. In Bitbucket, go back to Settings > Integrations and check that Microsoft Teams shows as connected. If not, reconnect it.
  2. Check the Teams channel. Ensure the channel hasn't been renamed, archived, or deleted. If it has, update the integration to point to a valid channel.
  3. Verify event selections. Make sure the event type you're testing (e.g., push) is enabled in the integration settings.
  4. Test with a simple event. Push a trivial commit to a repository and wait a minute. If nothing appears, try disconnecting and reconnecting the integration.
  5. Check permissions. The Microsoft account used for authorization must still have access to the Teams team. If the account was removed from the team, reauthorize with a different account.
  6. Look for service issues. Occasionally Bitbucket or Microsoft Teams may have outages. Check their status pages (status.bitbucket.org and the Microsoft 365 status page) before assuming a configuration problem.

If none of that works, remove the integration entirely and set it up again from scratch. This clears any stale connection data.

Frequently Asked Questions

Does this work with Bitbucket Server or Data Center?

No, the native Microsoft Teams integration is only available for Bitbucket Cloud. For Server or Data Center, you would need to use outgoing webhooks and a custom connector in Teams, which requires more setup.

Can I send notifications to multiple Teams channels?

Yes, you can add the integration multiple times, each pointing to a different channel. However, each integration is configured separately, so you'll need to repeat the setup for each channel.

What events can I send to Teams?

Bitbucket supports notifications for pushes, pull request creation and updates, build status changes, and other repository events. The exact list depends on your Bitbucket plan and the integration version.

Do I need to be a Bitbucket admin to set this up?

Yes, you need workspace admin permissions to access the Integrations settings and authorize the connection. If you're not an admin, ask your workspace administrator to perform the setup.

Is there a cost for this integration?

No, the Microsoft Teams integration for Bitbucket Cloud is free to use. You only pay for your existing Bitbucket and Microsoft Teams subscriptions, if applicable.

Can I customize the notification format?

No, the native integration sends notifications in a fixed format. For custom formatting, you would need to use webhooks and build your own message payloads.