*** title: Integrate Postman with Azure Pipelines updated: 2025-02-07T00:00:00.000Z slug: docs/integrations/available-integrations/ci-integrations/azure-pipelines max-toc-depth: 2 ---------------- The Azure Pipelines integration isn't available on Azure DevOps Server (hosted on-premises). [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) is a continuous integration (CI) and continuous delivery (CD) service that's integrated with Microsoft Azure DevOps. Software development teams can use Azure Pipelines to automatically build, test, and deploy code in Azure DevOps. To set up an Azure Pipelines integration for your API in the Postman API Builder, first create a pipeline in Azure DevOps. Then, configure your API in Postman. After you set up the integration, you can view the status of builds (pipelines) in Postman. ## Create a pipeline in Azure DevOps If you haven't already, create a pipeline in the [Azure Repos Git repository](https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops\&tabs=yaml) you use for your API. To learn more about Azure Repos, see [the Azure Repos documentation](https://learn.microsoft.com/en-us/azure/devops/repos/?view=azure-devops). To create a pipeline, add a YAML file in your repository. You define your pipeline in this YAML file. To learn more, see [the Azure Pipelines documentation](https://docs.microsoft.com/en-us/azure/devops/pipelines/get-started/pipelines-get-started). ## Configure an Azure Pipelines integration 1. Select **APIs** in the sidebar, then select your API. Each API can be linked to one repository. 2. Click **Test and Automation**. 3. Under **Automate**, select **Azure Pipelines**. 4. You'll be prompted to let Postman access your Azure DevOps account. After you grant access, you can close the browser tab and return to Postman. {/* vale postman-style-guide.Avoid = NO */} {/* "via" is part of a UI element */} **Make sure to enable third-party application access for your organization.** In Azure DevOps, go to your [organization settings](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/change-application-access-policies?view=azure-devops), click **Policies**, and turn on the toggle next to **Third-party application access via OAuth**. {/* vale postman-style-guide.Avoid = YES */} 1. Enter a **Nickname** to help you recognize the integration later. Postman pre-fills a nickname in the format `Azure Pipelines-{API_NAME}`, and you can edit it if you want. 2. Select the Azure DevOps **Organization** with your API repository. 3. Select the Azure **Repository** used for your API. 4. Click **Connect**. ## View build status After you set up an Azure Pipelines integration, information for build jobs (pipeline runs) is available in Postman. For each build you can view the branch, start time, duration, and status (`Succeeded` or `Failed`). You can also view the results of collection runs that are [configured in your pipeline using the Postman CLI](#view-collection-run-details). To view build jobs, open an API and click **Test and Automation**. The most recent jobs are listed under the repository name. You can't start Azure Pipelines builds directly in Postman. To start a new build, go to Azure DevOps. Click **View All Builds** to view the full list of build jobs. From here you can take the following actions: * Use the dropdown lists to filter jobs by branch or build status. * To open a build in Azure DevOps, select the build name. * To get the latest build status information, click Refresh icon **Refresh**. * To edit or delete the integration, click Options icon **View more actions**. View all Azure Pipelines builds ## View collection run details Using the Postman CLI, you can run Postman collections with your API tests as part of an Azure DevOps pipeline. To view details for collections that were run as part of a build, first [configure the Postman CLI for Azure Pipelines](#configure-the-postman-cli-for-azure-pipelines) and then start a new build in Azure DevOps. To learn more about starting builds, see [the Azure Pipelines documentation](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops). After the build is complete, expand a build and expand **Collection Runs**. Then expand a collection to view details about a collection run. Select **View Report** to view a collection run report in the Postman **History**. Learn more about using the [Collection Runner](/docs/collections/running-collections/intro-to-collection-runs/). {/* vale postman-style-guide.Headings = NO */} ## View API Governance and API Security rule violations {/* vale postman-style-guide.Headings = YES */} {/* "api lint" is a case-sensitive command */} {/* vale Vale.Terms = NO */} Using the Postman CLI, you can enforce [API Governance and API Security rules each time the pipeline runs](/docs/api-governance/api-definition/api-definition-warnings/#track-governance-and-security-rule-violations-in-cicd) using the [api lint command](/docs/postman-cli/postman-cli-options/#governance-and-security) ([Enterprise teams only](https://www.postman.com/pricing/)). {/* vale Vale.Terms = YES */} To view the results of API Governance and API Security checks that ran as part of the build, first [configure the Postman CLI for Azure Pipelines](#configure-the-postman-cli-for-azure-pipelines). Then, start a new build on Azure DevOps. After the build is complete, expand a build and expand an API specification stored in the Postman API Builder to view any rule violations. View API Governance and API Security results ## Configure the Postman CLI for Azure Pipelines With the Postman CLI and the Postman API, you can run Postman collections with your API tests as part of your Azure DevOps pipeline. First generate the Postman CLI configuration code in Postman. Then add the configuration code to the YAML file in your Azure Repos repository. Each time the pipeline runs, the Postman CLI runs the collections that contain your tests. You can view the results of your tests in Postman. Before you begin, make sure you've already [set up an integration](#configure-an-azure-pipelines-integration) between your API and Azure Pipelines. To generate configuration code for the Postman CLI, do the following: 1. Open your API and click **Test and Automation**. 2. Under the repository name, click **View All Builds**. 3. Click **Configure Postman CLI**. 4. Select a **Collection** to run during pipeline builds. To be available in the list, you must first [add the collection as a test suite](/docs/design-apis/api-builder/testing-an-api/#adding-api-tests) to your API in the Postman API Builder. You can also select an **Environment** to use. 5. (Optional) Select the checkbox to enforce API Governance and API Security rules each time the CI/CD pipeline runs ([Enterprise teams only](https://www.postman.com/pricing/)). 6. Select the **Operating system** for your CI/CD pipeline. 7. Click **Copy Postman CLI Command** to copy the Postman CLI configuration. Generate the Postman CLI configuration To add the Postman CLI configuration to your Azure DevOps pipeline, do the following: 1. Create a new YAML file in your Azure Repos repository, and then edit the file. 2. Add the Postman CLI configuration you copied from Postman to the YAML file. Replace all instances of `$(POSTMAN_API_KEY)` with a valid [Postman API Key](/docs/developer/postman-api/authentication/#generate-a-postman-api-key). Postman recommends that you store your Postman API key as a secret variable in Azure Pipelines to keep it secure. To learn more about secret variables, see [the Azure Pipelines documentation](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/set-secret-variables?view=azure-devops\&tabs=yaml%2Cbash). 3. Commit and push the changes to your remote repository. This will automatically start a build in Azure DevOps. 4. To view the test results in Postman, open your API and click **Test and Automation**. Learn more about [Viewing collection run details](#view-collection-run-details).