csharp
aspnet
azure
sample
active-directory-dotnet-native-aspnetcore-v2
Protect an ASP.NET Core Web API with the Microsoft identity platform.
Protecting an ASP.NET Core Web API using Microsoft identity platformIn this scenario, we protect a web API using the Microsoft identity platform. This ensures that the web API is accessible only to authenticated users. In these samples, we work with apps that authenticate users using both Work and school accounts and personal Microsoft accounts (MSA).
We also enhance the web API to use the on-behalf-of flow to call other web APIs protected by the Microsoft identity platform.
From your shell or command line:
git clone https://github.com/Azure-Samples/active-directory-dotnet-native-aspnetcore-v2.git
Structure of the repositoryTIP: To avoid path length limitations on Windows, you may need to clone into a directory with a shorter name or near the root of your drive.
This repository contains a progressive tutorial made up of the following chapters. We recommend you follow the tutorial in the order presented, but you can try out individual chapters if you wish.
We recommend that you start with chapter 1. Desktop app calls Web API, where you learn how to protect a web API with Microsoft Entra ID.
Community Help and SupportUse Stack Overflow to get support from the community. Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before. Tag your questions or comments with [msal
dotnet
].
If you find a bug in the sample, please open an issue on GitHub Issues.
To provide a recommendation, visit the following User Voice page.
If you'd like to contribute to this sample, see CONTRIBUTING.MD.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Other samples and documentationSee also other samples where a client app calls your own web API:
Then for other samples and docs:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4