|
| 1 | +--- |
| 2 | +title: Integrating CodeRabbit with SaaS Azure DevOps |
| 3 | +description: Integrate CodeRabbit with SaaS Azure DevOps. |
| 4 | +sidebar_label: SaaS Azure DevOps |
| 5 | +sidebar_position: 4 |
| 6 | +--- |
| 7 | + |
| 8 | +This guide will assist you in effectively integrating CodeRabbit with SaaS Azure DevOps. |
| 9 | + |
| 10 | +## How it works |
| 11 | + |
| 12 | +For the CodeRabbit app to post reviews on merge requests, it needs to interact with the Azure DevOps API, which requires a Personal Access Token. This token can be generated by creating a Personal Access Token from one of your existing users. |
| 13 | + |
| 14 | +You can create a new user in Azure DevOps and generate a Personal Access Token for that user, following [our recommendations](#recommendations). |
| 15 | + |
| 16 | +## Azure DevOps Personal Access Tokens |
| 17 | + |
| 18 | +To interact with the Azure DevOps API, a **Personal Access Token** is required. This token can be generated by creating a **Personal Access Token** from one of your existing users. |
| 19 | + |
| 20 | +Upon first login to the application (immediately after the onboarding screen), you will need to add the Personal Access Token. |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +#### Recommendations |
| 25 | + |
| 26 | +* **Create a dedicated user for CodeRabbit** - This ensures the user is exclusively for CodeRabbit, allowing better access control. |
| 27 | +* **Use "CodeRabbit" as the username** - This makes the user easily recognizable for future reference. |
| 28 | +* **Use a dedicated email address** - This helps in easy identification and management. |
| 29 | +* **Use the CodeRabbit logo as the profile picture** - This further ensures easy recognition. You can download our logo from [here](/img/integrations/logo.svg "download"). |
| 30 | + |
| 31 | +#### Key Points to Remember |
| 32 | + |
| 33 | +* Personal access tokens have expiration dates. Ensure the expiration date covers the duration of your intended use of the CodeRabbit app. |
| 34 | +* Code reviews will be attributed to the owner of the personal access token. |
| 35 | +* If the personal access token expires, you can add a new one via the CodeRabbit UI: |
| 36 | + * Navigate to the "AzureDevOps User" page in the sidebar. |
| 37 | + * Add the new token and click save. |
| 38 | + |
| 39 | +### Generating a Personal Access Token |
| 40 | + |
| 41 | +Azure DevOps provides an option to generate a personal access token for a user. Follow these steps to generate the token: |
| 42 | + |
| 43 | +1. Log in as the user intended for CodeRabbit reviews. |
| 44 | +2. Next to your avatar on the headers right side is a settings icon, click it. |
| 45 | +3. Choose "Personal Access Tokens" |
| 46 | +4. Click "New Token" |
| 47 | +5. Select the organization you want to use the token with or select "All accessible organizations." |
| 48 | +6. Enter a name and an expiry date for the token. |
| 49 | +7. We need read & write access to "Work Items" & "Code" to post reviews on pull requests. |
| 50 | +8. Click "Create" |
| 51 | + |
| 52 | + |
0 commit comments