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.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
TestApp
TestService
.gitignore added sample projects May 23, 2016
B2C.sln
LICENSE Initial commit May 23, 2016
README.md

README.md

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"
    }
  }