Skip to content

Latest commit

 

History

History
209 lines (137 loc) · 9.79 KB

File metadata and controls

209 lines (137 loc) · 9.79 KB
title Use Azure Repos with Slack
titleSuffix Azure Repos
description Monitor Azure Repos from Slack.
ms.service azure-devops
ms.subservice azure-devops-integration
ms.topic how-to
ms.manager bijuv
ms.author Divais
author Divais
monikerRange azure-devops
ms.date 10/24/2025
ms.custom cross-service, sfi-image-nochange

Use Azure Repos with Slack

[!INCLUDE version-eq-azure-devops]

If you use Slack, you can use the Azure Repos app for Slack to easily monitor your Azure Repos repositories. Set up and manage subscriptions to receive notifications in your channel whenever code is pushed or checked in and whenever a pull request (PR) gets created, updated, or merged. This app supports both Git and Team Foundation Version Control (TFVC) events.

Prerequisites

Category Requirements
Platform Azure Repos Slack app works only with Azure DevOps Services (cloud); it isn't supported on Azure DevOps Server.
Permissions To create subscriptions in a Slack channel for repository-related events: Member of the Project Administrators group or team administrator. For more information, see Change project-level permissions or Add a team administrator.
Microsoft Entra account If your organization is connected to a Microsoft Entra ID tenant, sign in with an account that is a native member of that tenant; guest or external accounts can experience authentication errors when signing in through Slack.

Add the Azure Repos app to your Slack workspace

  1. Go to the Azure Repos Slack app and select Add to Slack.

    [!div class="mx-imgBorder"] Screenshot of Slack app directory, Azure Repos and button, Add to Slack.

    Once added, you receive something like the following welcome message.

    [!div class="mx-imgBorder"] Screenshot of Welcome message from Slack.

  2. Use the /azrepos Slack handle to interact with the app. A full list of commands is provided in the Command reference section of this article.

Connect the Azure Repos app to your repositories

  1. Connect and authenticate yourself to Azure Repos using /azrepos signin command.

    [!div class="mx-imgBorder"] Screenshot of Sign in prompt for Slack.

  2. Select Sign in.

  3. Accept the Azure Repos Slack Integration.

    [!div class="mx-imgBorder"] Screenshot of Accept button in resulting sign-in screen.

    A verification code displays for use in your chat app to complete authentication.

  4. Copy the authentication code.

    [!div class="mx-imgBorder"] Screenshot of verification code provided by Azure Repos.

  5. Select Enter code, paste the code, and then select Submit.

    [!div class="mx-imgBorder"] Screenshot of final authentication screen when verification code is pasted and then submit button is selected.

    Confirmation of sign-in displays within the chat.

    :::image type="content" source="media/integrations-slack/signed-in-confirmation.png" alt-text="Screenshot sign-in confirmation in chat.":::

To start monitoring all Git repositories in a project, use the following slash command inside a channel:

/azrepos subscribe [project url]

The project URL can be to any page within your project (except URLs to repositories). For example:

/azrepos subscribe https://dev.azure.com/myorg/myproject/

You can also monitor a specific repository using the following command:

/azrepos subscribe [repository url]

The repository URL can be to any page within your repository that has your repository name. For example, for Git repositories, use:

/azrepos subscribe https://dev.azure.com/myorg/myproject/_git/myrepository

For TFVC repositories, use:

/azrepos subscribe https://dev.azure.com/myorg/myproject/_versionControl

Note

You can only subscribe to public repositories.

The subscribe command gets you started with a default subscription. For Git repositories, the channel is subscribed to the Pull request created event (with target branch = main), and for TFVC repositories, the channel is subscribed to the Code checked in event.

[!div class="mx-imgBorder"] Screenshot shows Default subscriptions creation message.

Manage subscriptions

To view, add, or remove subscriptions for a channel, use the following subscriptions command:

/azrepos subscriptions

This command lists all the current subscriptions for the channel and allows you to add new subscriptions or remove existing ones. When adding subscriptions, you can customize the notifications you get by using various filters, as described in the following section.

Note

Team administrators can't remove or modify subscriptions created by Project administrators.

[!div class="mx-imgBorder"] Screenshot showing View of subscriptions list.

Use filters to customize subscriptions

When a user subscribes to a repository using the /azrepos subscribe command, a default subscription gets created. Often, users need to customize these subscriptions. For example, users might want to get notified only when PRs have a specific reviewer.

The following steps demonstrate how to customize subscriptions.

  1. Run the /azrepos subscriptions command.
  2. In the list of subscriptions, if there's a subscription that's unwanted or must be modified (Example: creating noise in the channel), select the Remove button.
  3. Select the Add subscription button.
  4. Select the required repository and the desired event.
  5. Select the appropriate filters.

Example: Get notifications only when my team is in the reviewer list for a PR

[!div class="mx-imgBorder"] Screenshot shows Reviewer has my team.

Example: Tell me when merge attempts fail due to a policy violation

[!div class="mx-imgBorder"] Screenshot show Merge attempt unsuccessful – due to policy violation.

Note

  • All the filters are typically drop-downs. But if the drop-down has greater than 100 items, then users must enter the values manually.
  • For the TFVC Code Checked in event, the filter Under path must be of the format $/myproject/path.

Preview pull request URLs

When a user pastes the URL of a PR, a preview display like the following image, which helps to keep PR-related conversations contextual and accurate.

[!div class="mx-imgBorder"] Screenshot shows URL unfurling.

Once users sign in, this feature works for all channels in a workspace.

Remove subscriptions and repositories from a channel

Use the following command to clean up your channel by removing repositories and subscriptions.

/azrepos unsubscribe all [project url]

For example, the following command deletes all the subscriptions related to any repository in the project and removes the repositories from the channel. Only project admins can run this command.

/azrepos unsubscribe all https://dev.azure.com/myorg/myproject

Command reference

The following table lists all the /azrepos commands you can use in your Slack channel.

Slash command Functionality
/azrepos subscribe [repository url/ project url] Subscribe to a repository or all repositories in a project for notifications
/azrepos subscriptions Add or remove subscriptions for this channel
/azrepos signin Sign in to your Azure Repos organization
/azrepos signout Sign out from your Azure Repos organization
/azrepos feedback Report a problem or suggest a feature
/azrepos unsubscribe all [project url] Remove all repositories (belonging to a project) and their associated subscriptions from a channel
/azrepos help Get help on the commands

Notifications in private channels

The Azure Repos app can help you monitor the repository events in your private channels, too. Invite the bot to your private channel by using /invite @azrepos. Then, you can manage your notifications the same way you would for a public channel.

Troubleshoot

If you're experiencing the following errors when using the Azure Repos App for Slack, follow the procedures in this section.

[!INCLUDE troubleshooting]

In the same browser, start a new tab, navigate to https://slack.com, and sign in to your work space (use web client). Run the /azrepos signout command followed by the /azrepos signin command.

If these steps don't resolve your authentication issue, reach out to us at Developer Community.

Related articles