aspnet-snippets-sample

(β˜… 196)

A repository of code snippets that use Microsoft Graph to perform common tasks such as sending email, managing groups, and other activities from an ASP.NET Core MVC app. This sample uses the Microsoft Graph .NET Client Library to work with data, and the Microsoft Identity Web Library for authentication on the Microsoft identity platform v2.0 endpoint.

  • .gitattributes
  • .gitignore
  • aspnet-snippets-sample.yml
  • CODE_OF_CONDUCT.md
  • LICENSE
  • README.md
  • SECURITY.md

# Installation Guide

1. Get the code
git clone https://github.com/microsoftgraph/aspnet-snippets-sample

Downloads the entire project code from GitHub to your computer.

cd aspnet-snippets-sample

Moves into the project folder you just downloaded.

2. .NET

Medium Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • .NET SDK The SDK required for the dotnet command.
dotnet restore

Downloads the packages the project depends on.

dotnet user-secrets init

Type this command into your terminal and run it.

dotnet user-secrets set "AzureAd:ClientId" "YOUR_APP_ID"

Type this command into your terminal and run it.

dotnet user-secrets set "AzureAd:ClientSecret" "YOUR_APP_SECRET"

Type this command into your terminal and run it.

- From your CLI: `dotnet run`

Builds the project and runs it immediately.

βœ… After dotnet run, check the message or address shown in the terminal.

Pulled directly from this repo's README.

// repository documentation