Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Updates #729

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions labs/azuredevops/agile/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ In this lab, you will learn about the agile planning and portfolio management to
<a name="Prerequisites"></a>
### Prerequisites ###

- Clone and build <a href="../buildapp/">Azure DevOps Demo Generator</a>

- This lab requires you to complete task 1 from the <a href="../prereq/">prerequisite</a> instructions. (No cloning needed for this lab, skip Task 2)

<a name="Exercise1"></a>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labs/azuredevops/appregister/images/ChooseAPI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions labs/azuredevops/appregister/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: Azure DevOps Lab Prerequisites
layout: page
sidebar: vsts
permalink: /labs/azuredevops/appregister/
folder: /labs/azuredevops/appregister/
version: Lab version - 1.00.0
updated: Last updated - 13/01/2025
---

<a name="Overview"></a>

## Overview

Register Your Application in Azure AD

<a name="Register a New Application"></a>

## 1. Register a New Application

- Sign in to the Azure Portal. Navigate to [Azure Portal](https://portal.azure.com).

- Go to **Azure Active Directory** > **App registrations** > **New registration**.
- Enter the following details:
- **Name**: Enter a meaningful name for your app.
- **Supported Account Types**: Choose an option based on your needs:
- Single tenant: Accounts in your organization only.
- Multi-tenant: Accounts in any organization's directory.
- **Redirect URI**: This is not required for Device Code Flow but can be added later if needed.
- Click **Register**.

<a name="Copy the Application (Client) ID"></a>

## 2. Copy the Application (Client) ID

- After registration, go to the **Overview** section.
- Copy the **Application (client) ID** and the **Directory (tenant) ID** and save it for later.

![](images/AppDetails.png)

<a name="Configure API Permissions"></a>

## 3. Configure API Permissions

- Navigate to **API Permissions** > **Add a permission**.

- Select **Azure DevOps** or any other API you want to access.

![](images/ChooseAPI.png)

<a name="Following are the scopes required"></a>

## 4. Following are the scopes required

| Scope | Description |
| -------------------------- | ------------------------------------------ |
| vso.agentpools | Agent Pools (read) |
| vso.build_execute | Build (read and execute) |
| vso.code_full | Code (full) |
| vso.dashboards_manage | Team dashboards (manage) |
| vso.extension_manage | Extensions (read and manage) |
| vso.profile | User profile (read) |
| vso.project_manage | Project and team (read, write and manage) |
| vso.release_manage | Release (read, write, execute and manage) |
| vso.serviceendpoint_manage | Service Endpoints (read, query and manage) |
| vso.test_write | Test management (read and write) |
| vso.variablegroups_write | Variable Groups (read, create) |
| vso.work_full | Work items (full) |

<a name="Configure the App Settings"></a>

## 5. Configure the App Settings

- Open your application’s configuration file (e.g., `appsettings.json`) under AppSettings.
- Add the following details:

```json
{
"AppSettings": {
"...": "...",
"clientId": "<Your Application (Client) ID>",
"tenantId": "<Your Directory (Tenant) ID>",
"scope": "499b84ac-1321-427f-aa17-267ca6975798/.default"
}
}
```

- Replace placeholders with the actual values from the Azure Portal.

<a name="Test the Application"></a>

## 5. Test the Application

- Run your application.

- The app will display a message instructing the user to go to `https://microsoft.com/devicelogin` and enter the provided device code.

- After entering the code, users will authenticate, and the app will receive an access token.
85 changes: 85 additions & 0 deletions labs/azuredevops/buildapp/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: Azure DevOps Lab Prerequisites
layout: page
sidebar: vsts
permalink: /labs/azuredevops/buildapp/
folder: /labs/azuredevops/buildapp/
version: Lab version - 1.00.0
updated: Last updated - 13/01/2025
---

<a name="Overview"></a>

## Overview

To run the ADOGenerator project as a console application or executable, follow these steps:

Ensure you have the following installed on your machine:

- [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
- [Visual Studio](https://visualstudio.microsoft.com/) or any other preferred IDE

<a name="Steps"></a>

## Steps

1. **Clone the Repository**
If you haven't already, clone the repository to your local machine:

```sh
git clone <repository-url>
cd <repository-directory>
```

2. **Open the Solution**
Open the ADOGenerator.sln solution file in Visual Studio or your preferred IDE.

3. **Set ADOGenerator as the Startup Project**
In Visual Studio:

- Right-click on the ADOGenerator project in the Solution Explorer.
- Select Set as Startup Project.

4. **Build the Solution**
Build the solution to ensure all dependencies are restored and the project compiles successfully:

- In Visual Studio, right-click on the solution in the Solution Explorer and select `Build Solution`.
- Alternatively, you can use the command line:
```sh
dotnet build
```

5. **Run the Project**
To run the project as a console application:

- In Visual Studio, press `F5` or click on the Start button.
- Alternatively, you can run the project from the command line:
```sh
dotnet run --project src/ADOGenerator/ADOGenerator.csproj
```

6. **Publish the Project**
To create an executable, publish the project:

- In Visual Studio, right-click on the ADOGenerator project in the Solution Explorer and select `Publish`.
- Follow the prompts to configure the publish settings (e.g., target folder, configuration, etc.).
- Alternatively, you can use the command line:
```sh
dotnet publish src/ADOGenerator/ADOGenerator.csproj -c Release -r win-x64 --self-contained
```

7. **Run the Executable**
Navigate to the publish directory and run the executable:
```sh
cd src/ADOGenerator/bin/Release/net8.0/win-x64/publish
./ADOGenerator.exe
```

<a name="Additional Nodes"></a>

## Additional Notes

- Ensure that any required configuration files (e.g., `appsettings.json`) are present in the output directory.
- If you encounter any issues, check the console output for error messages and resolve any missing dependencies or configuration issues.

By following these steps, you should be able to run the ADOGenerator project as a console application or executable.
2 changes: 2 additions & 0 deletions labs/azuredevops/continuousdeployment/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ In this lab, you will learn about the release management features available in A

- An Azure account (free from [https://azure.com/free](https://azure.com/free)).

- Clone and build <a href="../buildapp/">Azure DevOps Demo Generator</a>

- Complete task 1 from the <a href="../prereq/">prerequisite</a> instructions.

<a name="Exercise1"></a>
Expand Down
2 changes: 2 additions & 0 deletions labs/azuredevops/continuousintegration/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ In this lab, you will learn how to configure continuous integration (CI) and con
<a name="Prerequisites"></a>
### Prerequisites ###

- Clone and build <a href="../buildapp/">Azure DevOps Demo Generator</a>

- This lab requires you to complete task 1 from the <a href="../prereq/">prerequisite</a> instructions.

<a name="Exercise1"></a>
Expand Down
Loading