aspnet-snippets-sample
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.
File Explorer
Download Latest Version (.zip)- ask-a-question.md
- bug_report.md
- launch.json
- tasks.json
- README-de-de.md
- README-es-es.md
- README-fr-fr.md
- README-ja-jp.md
- README-pt-br.md
- README-ru-ru.md
- README-zh-cn.md
- README-zh-tw.md
- AlertExtensions.cs
- WithAlertResult.cs
- BaseController.cs
- CalendarController.cs
- ExtensionsController.cs
- FilesController.cs
- GroupsController.cs
- HomeController.cs
- MailController.cs
- TeamsController.cs
- UsersController.cs
- GraphClaimsPrincipalExtensions.cs
- GraphConstants.cs
- Alert.cs
- CalendarViewEvent.cs
- CalendarViewModel.cs
- DailyViewModel.cs
- ErrorViewModel.cs
- FilesViewDisplayModel.cs
- GroupsListDisplayModel.cs
- GroupWithPhoto.cs
- MailViewDisplayModel.cs
- NewEvent.cs
- RoamingSettings.cs
- RoamingSettingsDisplayModel.cs
- TeamDisplayModel.cs
- TeamMessageDisplayModel.cs
- TeamsListDisplayModel.cs
- UsersListDisplayModel.cs
- UserWithPhoto.cs
- launchSettings.json
- DateTimeOffsetTagHelper.cs
- _AttendeeListPartial.cshtml
- _AttendeeTimePartial.cshtml
- _DailyEventsPartial.cshtml
- _OrganizerTimePartial.cshtml
- Display.cshtml
- Index.cshtml
- New.cshtml
- Index.cshtml
- _FileListPartial.cshtml
- _FolderListPartial.cshtml
- _SharedItemListPartial.cshtml
- Display.cshtml
- Drive.cshtml
- Index.cshtml
- NewFile.cshtml
- NewFolder.cshtml
- SharedWithMe.cshtml
- UploadFile.cshtml
- _GroupListPartial.cshtml
- Create.cshtml
- Display.cshtml
- List.cshtml
- Index.cshtml
- _MessageListPartial.cshtml
- _RecipientListPartial.cshtml
- Display.cshtml
- Index.cshtml
- New.cshtml
- _AlertPartial.cshtml
- _AttachmentListPartial.cshtml
- _Layout.cshtml
- _LoginPartial.cshtml
- _ValidationScriptsPartial.cshtml
- Error.cshtml
- _AppListPartial.cshtml
- _ChannelListPartial.cshtml
- _NonTeamGroupListPartial.cshtml
- _TeamGroupListPartial.cshtml
- _TeamListPartial.cshtml
- Create.cshtml
- Display.cshtml
- List.cshtml
- PostMessageToChannel.cshtml
- _UserListPartial.cshtml
- AdminList.cshtml
- Create.cshtml
- Display.cshtml
- List.cshtml
- _ViewImports.cshtml
- _ViewStart.cshtml
- site.css
- no-profile-photo-lg.png
- no-profile-photo.png
- site.js
- bootstrap-grid.css
- bootstrap-grid.css.map
- bootstrap-grid.min.css
- bootstrap-grid.min.css.map
- bootstrap-reboot.css
- bootstrap-reboot.css.map
- bootstrap-reboot.min.css
- bootstrap-reboot.min.css.map
- bootstrap.css
- bootstrap.css.map
- bootstrap.min.css
- bootstrap.min.css.map
- bootstrap.bundle.js
- bootstrap.bundle.js.map
- bootstrap.bundle.min.js
- bootstrap.bundle.min.js.map
- bootstrap.js
- bootstrap.js.map
- bootstrap.min.js
- bootstrap.min.js.map
- LICENSE
- jquery.js
- jquery.min.js
- jquery.min.map
- LICENSE.txt
- additional-methods.js
- additional-methods.min.js
- jquery.validate.js
- jquery.validate.min.js
- LICENSE.md
- jquery.validate.unobtrusive.js
- jquery.validate.unobtrusive.min.js
- LICENSE.txt
- favicon.ico
- appsettings.Development.json
- appsettings.json
- libman.json
- Program.cs
- SnippetsApp.csproj
- Startup.cs
- .gitattributes
- .gitignore
- aspnet-snippets-sample.yml
- CODE_OF_CONDUCT.md
- LICENSE
- README.md
- SECURITY.md
# Installation Guide
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 Recommendeddotnet 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.
Pulled directly from this repo's README.
