Skip to content

Azure-Samples/ms-identity-ciam-dotnet-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

page_type languages products description urlFragment
sample
csharp
microsoft-identity-web
msalnet
Tutorial: Enable your .NET application to sign-in users and call APIs with Azure AD for Customers
ms-identity-ciam-dotnet-tutorial

Tutorial: Enable your .NET application to sign-in users and call APIs with Azure AD for Customers

This tutorial aims to take you through the fundamentals of modern authentication with Azure AD Consumer Identity and Access Management (CIAM), using the Microsoft Authentication Library for .NET and Microsoft.Identity.Web.

Prerequisites

Please refer to each sample's README for sample-specific prerequisites.

Recommendations

  • jwt.ms for inspecting your tokens
  • Fiddler for monitoring your network activity and troubleshooting
  • Follow the Azure AD Blog to stay up-to-date with the latest developments

Please refer to each sample's README for sample-specific recommendations.

Contents

Chapter 1: Sign-in a user to your application

Sign-in using an ASP.NET Core web app
Sign-in your users with Azure AD for Customers and learn to work with ID Tokens. Learn how single sign-on (SSO) works. Learn to integrate with user-flows and external identity providers.
Sign-in using a MAUI cross-platform app
Sign-in your users with Azure AD for Customers and learn to work with ID Tokens. Learn how single sign-on (SSO) works. Learn to integrate with user-flows and external identity providers.
Sign-in using a browserless app
Sign-in your users with Azure AD for Customers and learn to work with a browserless device code flow. Learn to integrate with user-flows and external identity providers.
Sign-in using WPF app
Sign-in your users with Azure AD for Customers and learn to work with ID Tokens using desktop applications. Learn to integrate with user-flows and external identity providers.

Chapter 2: Protect an API and call the API from your client app

Use an ASP.NET Core web application and call a protected web API on Azure AD for Customers
Protect your web API with the Azure AD for Customers. Use a client application to sign-in a user, acquire an Access Token for your web API and call your protected web API.*
Use a Blazor Server application and call a protected web API on Azure AD for Customers
Protect your web API with the Azure AD for Customers. Use a client application to sign-in a user, acquire an Access Token for your web API and call your protected web API.*
Use a daemon application to send and receive data from a protected web API on Azure AD for Customers
Protect your web API with the Azure AD for Customers. Use a daemon application to acquire an Access Token for your web API and call your protected web API.

We'd love your feedback

Were we successful in addressing your learning objective? Consider taking a moment to share your experience with us.

More information

Learn more about the Microsoft identity platform:

See more code samples:

Community Help and Support

Use 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. Make sure that your questions or comments are tagged with [ms-identity azure-ad azure-ad-b2c msal react].

If you find a bug in the sample, please raise the issue on GitHub Issues.

To provide a recommendation, visit the following User Voice page.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit cla.opensource.microsoft.com.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.