Skip to content

A sample demonstrating how you can configure your ASP.NET Core 3.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.

master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

azure-ad-b2c-asp-net-core

A sample demonstrating how you can configure your ASP.NET Core 3.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 3.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.

Topics

Resources

License

Releases

No releases published

Packages

No packages published