Skip to content

A sample demonstrating how you can configure your ASP.NET Core 2.0 applications to take advantage of Azure AD B2C to perform such tasks as authenticating users, protecting Web APIs, redeeming authorization code, calling a protected Web API.

License

Notifications You must be signed in to change notification settings

crow-ua/azure-ad-b2c-asp-net-core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

azure-ad-b2c-asp-net-core

A sample demonstrating how you can configure your ASP.NET Core 2.0 applications to take advantage of Azure AD B2C and MSAL to perform such tasks as:

  • Authenticate users
  • Protect Web APIs
  • Redeem authorization code
  • Call a protected Web API

Please find more information in this walk-through post: Setting up your ASP.NET Core 2.0 apps and services for Azure AD B2C

Configuration

Web App

"Authentication": {
    "AzureAd": {
      "Instance": "e.g. https://login.microsoftonline.com/",
      "TenantId": "e.g. <your domain>.onmicrosoft.com>",
      "ClientId": "",
      "ClientSecret": "",
      "PostLogoutRedirectUri": "https://localhost:44397/",
      "ApiIdentifier": "https://<tenant name>.onmicrosoft.com/testapi",
      "B2C": {
        "SignInOrSignUpPolicy": "e.g B2C_1_TestSignUpAndSignInPolicy",
        "EditProfilePolicy": "e.g B2C_1_TestProfileEditPolicy",
        "ResetPasswordPolicy": "e.g. B2C_1_TestPasswordReset"
      }
    }
  },
  "TestServiceOptions": {
    "BaseUrl": "https://localhost:44359/"
  } 

TestService

"Authentication": {
    "AzureAd": {
      "Instance": "e.g. https://login.microsoftonline.com/",
      "TenantId": "e.g. <your domain>.onmicrosoft.com>",
      "Audience": "Use client Id of the common app",
      "SignInOrSignUpPolicy": "e.g B2C_1_TestSignUpAndSignInPolicy"
    }
  }

About

A sample demonstrating how you can configure your ASP.NET Core 2.0 applications to take advantage of Azure AD B2C to perform such tasks as authenticating users, protecting Web APIs, redeeming authorization code, calling a protected Web API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 51.5%
  • HTML 43.3%
  • JavaScript 2.7%
  • CSS 2.5%