Learn about Azure AD - Microsoft's cloud-scale identity platform. It can be tricky to figure out how auth works, but once you know it's a powerful tool in your toolbox. In this repository we'll learn how it's done in a .NET web app. We'll discover what app registrations are, why we need one and how to wire up auth between a web app and an API backend.
Run the app and observe the CRUD operations for TodListClient a .NET 7 ASP.NET Core MVC web app with a Web API backend that uses an in-memory dataset.
-
Set multiple startup projects
https://learn.microsoft.com/en-us/visualstudio/ide/how-to-set-multiple-startup-projects?view=vs-2022
-
Start the solution and view the TodoList page
You are now ready to use the demo script to learn about Azure AD App Registrations and the code changes needed to bring auth to your soltuion.
- Best practices for the Microsoft identity platform - Microsoft Entra | Microsoft Learn
- Configure your Azure AD application with Integration assistant - Waldek Mastykarz
And other Azure AD Sample projects
- Code samples for Microsoft identity platform authentication and authorization - Microsoft Entra | Microsoft Learn
- Reliable Web App Patterns
Tip #3 Debug App Registrations with authr.dev
- Host name preservation - Azure Architecture Center | Microsoft Learn
- Deploying web apps to App Services as Linux containers · (github.com)
- Use App Roles when you can
- Azure AD changes are asynchronous – give it a minute to propagate
- Manage JSON Web Tokens in development with dotnet user-jwts | Microsoft Learn
Tips for dealing with issues.
SocketException: No connection could be made...
- Configure the solution to set both web apps as startup projects.