SlideShare a Scribd company logo
Azure AD B2C Webinar Series
B2C & App Integration with the
Microsoft Authentication Libraries (MSAL)
Azure AD B2C
Webinar series
Why MSAL?
 Supports OAuth and OIDC
 Acquires all types of tokens.
 Implements a Token Cache
 Developer Friendly API
 Battle hardened
 Get help when you need it!
Authentication Libraries
Microsoft Authentication Libraries (MSAL)
Used to acquire tokens to call protected APIs
Middleware libraries
Used by node.js, ASP.NET, ASP.NET Core to validate
access tokens in web APIs and ID tokens in Web apps.
Scenarios and supported platforms and language
AAD B2C
Issue a token
Read
user
profile
Create
an
account
Sign-Up
or Sign-
In
Policy name
Token issuing
Redirect back to application
Validate and
read token
Read user profile
ACTIVITY
ACTIVITY
Create an ASP .NET Core Web App
Sign-in Users
If you start from ASP .NET Core templates
If, now, you want to call web APIs reliably:
OnAuthorizationCodeReceived
deem the auth code
build an MSAL.NET confidential client application
mplement token cache serialize
AcquireTokenSilent
Override the OpenIdConnect Events
Build a confidential client with MSAL .NET
string authority = $"{_applicationOptions.Instance}tfp/“
+"{_microsoftIdentityOptions.Domain}/"+
"{_microsoftIdentityOptions.DefaultUserFlow}";
_application = ConfidentialClientApplicationBuilder
.CreateWithApplicationOptions(_applicationOptions)
.WithRedirectUri(currentUri)
.WithB2CAuthority(authority)
.WithHttpClientFactory(_httpClientFactory)
.Build();
Redeem the auth code with MSAL .NET
Implement token cache serialization
• Complex (security and performance implications)
• Serialization depends
on your needs
- in memory,
- database,
- Redis etc …
In the Controller, acquire a token with MSAL .NET
Building blocks and integration points
ASP.NET Core Web App or Web API
ASP.NET Core framework
ASP.NET Core OIDC middleware ASP.NET Core - JwtBearer middleware
Core Components
Microsoft.IdentityModel (Wilson) WsTrust…
.NET Core
ACTIVITY
Azure AD B2C Webinar Series: Identity Protocols OIDC and OAuth2 part 2

More Related Content

What's hot

What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
ukdpe
 

What's hot (20)

Running Regulated Workloads on Azure PaaS services (DogFoodCon 2018)
Running Regulated Workloads on Azure PaaS services (DogFoodCon 2018)Running Regulated Workloads on Azure PaaS services (DogFoodCon 2018)
Running Regulated Workloads on Azure PaaS services (DogFoodCon 2018)
 
Office 365 api vs share point app model
Office 365 api vs share point app modelOffice 365 api vs share point app model
Office 365 api vs share point app model
 
Azure AD App Proxy Login Scenarios with an On Premises Applications - TSPUG
Azure AD App Proxy Login Scenarios with an On Premises Applications - TSPUGAzure AD App Proxy Login Scenarios with an On Premises Applications - TSPUG
Azure AD App Proxy Login Scenarios with an On Premises Applications - TSPUG
 
SPS Belgium 2015 - High-trust Apps for On-Premises Development
SPS Belgium 2015 -  High-trust Apps for On-Premises DevelopmentSPS Belgium 2015 -  High-trust Apps for On-Premises Development
SPS Belgium 2015 - High-trust Apps for On-Premises Development
 
Microsoft Reactor Toronto 5/5/2020 | Azure Kubernetes In Action - Running and...
Microsoft Reactor Toronto 5/5/2020 | Azure Kubernetes In Action - Running and...Microsoft Reactor Toronto 5/5/2020 | Azure Kubernetes In Action - Running and...
Microsoft Reactor Toronto 5/5/2020 | Azure Kubernetes In Action - Running and...
 
Microsoft Azure Identity and O365
Microsoft Azure Identity and O365Microsoft Azure Identity and O365
Microsoft Azure Identity and O365
 
High-Trust Add-Ins SharePoint for On-Premises Development
High-Trust Add-Ins SharePoint for On-Premises DevelopmentHigh-Trust Add-Ins SharePoint for On-Premises Development
High-Trust Add-Ins SharePoint for On-Premises Development
 
Easy Auth Overview - Tokyo Azure Meetup - Feb 2018
Easy Auth Overview - Tokyo Azure Meetup - Feb 2018Easy Auth Overview - Tokyo Azure Meetup - Feb 2018
Easy Auth Overview - Tokyo Azure Meetup - Feb 2018
 
Windows Server 2008 for Developers - Part 1
Windows Server 2008 for Developers - Part 1Windows Server 2008 for Developers - Part 1
Windows Server 2008 for Developers - Part 1
 
OAuth in SharePoint 2013
OAuth in SharePoint 2013OAuth in SharePoint 2013
OAuth in SharePoint 2013
 
Azure Key Vault with a PaaS Architecture and ARM Template Deployment
Azure Key Vault with a PaaS Architecture and ARM Template DeploymentAzure Key Vault with a PaaS Architecture and ARM Template Deployment
Azure Key Vault with a PaaS Architecture and ARM Template Deployment
 
EWUG - Azure AD Pass-through Authentication and Seamless Single Sign-On
EWUG - Azure AD Pass-through Authentication and Seamless Single Sign-OnEWUG - Azure AD Pass-through Authentication and Seamless Single Sign-On
EWUG - Azure AD Pass-through Authentication and Seamless Single Sign-On
 
Sync on Android
Sync on AndroidSync on Android
Sync on Android
 
Windows Azure Active Directory
Windows Azure Active DirectoryWindows Azure Active Directory
Windows Azure Active Directory
 
Azure AD Presentation - @ BITPro - Ajay
Azure AD Presentation - @ BITPro - AjayAzure AD Presentation - @ BITPro - Ajay
Azure AD Presentation - @ BITPro - Ajay
 
Community call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformCommunity call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platform
 
Iam
IamIam
Iam
 
Microsoft identity platform community call-May 2020
Microsoft identity platform community call-May 2020Microsoft identity platform community call-May 2020
Microsoft identity platform community call-May 2020
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Certifications for Azure Developers
Certifications for Azure DevelopersCertifications for Azure Developers
Certifications for Azure Developers
 

Similar to Azure AD B2C Webinar Series: Identity Protocols OIDC and OAuth2 part 2

CTU June 2011 - Windows Azure App Fabric
CTU June 2011 - Windows Azure App FabricCTU June 2011 - Windows Azure App Fabric
CTU June 2011 - Windows Azure App Fabric
Spiffy
 
Deep Dive on Amazon Cognito - DevDay Austin 2017
Deep Dive on Amazon Cognito - DevDay Austin 2017Deep Dive on Amazon Cognito - DevDay Austin 2017
Deep Dive on Amazon Cognito - DevDay Austin 2017
Amazon Web Services
 

Similar to Azure AD B2C Webinar Series: Identity Protocols OIDC and OAuth2 part 2 (20)

"Secure Mobile Apps with the Microsoft Identity Platform", Christos Matskas, ...
"Secure Mobile Apps with the Microsoft Identity Platform", Christos Matskas, ..."Secure Mobile Apps with the Microsoft Identity Platform", Christos Matskas, ...
"Secure Mobile Apps with the Microsoft Identity Platform", Christos Matskas, ...
 
Microsoft identity manoj mittal
Microsoft identity manoj mittalMicrosoft identity manoj mittal
Microsoft identity manoj mittal
 
CTU June 2011 - Windows Azure App Fabric
CTU June 2011 - Windows Azure App FabricCTU June 2011 - Windows Azure App Fabric
CTU June 2011 - Windows Azure App Fabric
 
Introduction to the Microsoft identity platform for developers
Introduction to the Microsoft identity platform for developersIntroduction to the Microsoft identity platform for developers
Introduction to the Microsoft identity platform for developers
 
Simplify user application authentication using Microsoft Identity Platform
Simplify user application authentication using  Microsoft Identity PlatformSimplify user application authentication using  Microsoft Identity Platform
Simplify user application authentication using Microsoft Identity Platform
 
Azure Active Directory - An Introduction for Developers
Azure Active Directory - An Introduction for DevelopersAzure Active Directory - An Introduction for Developers
Azure Active Directory - An Introduction for Developers
 
Securing Serverless Workloads with Cognito and API Gateway Part I - AWS Secur...
Securing Serverless Workloads with Cognito and API Gateway Part I - AWS Secur...Securing Serverless Workloads with Cognito and API Gateway Part I - AWS Secur...
Securing Serverless Workloads with Cognito and API Gateway Part I - AWS Secur...
 
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
 
Deep Dive on Amazon Cognito - DevDay Austin 2017
Deep Dive on Amazon Cognito - DevDay Austin 2017Deep Dive on Amazon Cognito - DevDay Austin 2017
Deep Dive on Amazon Cognito - DevDay Austin 2017
 
Spsbe15 high-trust apps for on-premises development
Spsbe15   high-trust apps for on-premises developmentSpsbe15   high-trust apps for on-premises development
Spsbe15 high-trust apps for on-premises development
 
Identity in ASP.NET Core
Identity in ASP.NET CoreIdentity in ASP.NET Core
Identity in ASP.NET Core
 
(DEV203) Amazon API Gateway & AWS Lambda to Build Secure APIs
(DEV203) Amazon API Gateway & AWS Lambda to Build Secure APIs(DEV203) Amazon API Gateway & AWS Lambda to Build Secure APIs
(DEV203) Amazon API Gateway & AWS Lambda to Build Secure APIs
 
Microsoft graph and power platform champ
Microsoft graph and power platform   champMicrosoft graph and power platform   champ
Microsoft graph and power platform champ
 
Announcements for Mobile Developers
Announcements for Mobile DevelopersAnnouncements for Mobile Developers
Announcements for Mobile Developers
 
(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...
(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...
(MBL311) Workshop: Build an Android App Using AWS Mobile Services | AWS re:In...
 
CIS14: Enterprise Identity APIs
CIS14: Enterprise Identity APIsCIS14: Enterprise Identity APIs
CIS14: Enterprise Identity APIs
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure AD
 
Oauth Nightmares Abstract OAuth Nightmares
Oauth Nightmares Abstract OAuth Nightmares Oauth Nightmares Abstract OAuth Nightmares
Oauth Nightmares Abstract OAuth Nightmares
 
Building Solution Templates and Managed Applications for the Azure Marketplace
Building Solution Templates and Managed Applications for the Azure MarketplaceBuilding Solution Templates and Managed Applications for the Azure Marketplace
Building Solution Templates and Managed Applications for the Azure Marketplace
 
Extending Oracle SSO
Extending Oracle SSOExtending Oracle SSO
Extending Oracle SSO
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 

Recently uploaded (20)

Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 

Azure AD B2C Webinar Series: Identity Protocols OIDC and OAuth2 part 2

  • 1. Azure AD B2C Webinar Series
  • 2. B2C & App Integration with the Microsoft Authentication Libraries (MSAL) Azure AD B2C Webinar series
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Why MSAL?  Supports OAuth and OIDC  Acquires all types of tokens.  Implements a Token Cache  Developer Friendly API  Battle hardened  Get help when you need it!
  • 8. Authentication Libraries Microsoft Authentication Libraries (MSAL) Used to acquire tokens to call protected APIs Middleware libraries Used by node.js, ASP.NET, ASP.NET Core to validate access tokens in web APIs and ID tokens in Web apps. Scenarios and supported platforms and language
  • 9.
  • 12. Policy name Token issuing Redirect back to application Validate and read token Read user profile
  • 15. Create an ASP .NET Core Web App Sign-in Users
  • 16.
  • 17. If you start from ASP .NET Core templates If, now, you want to call web APIs reliably: OnAuthorizationCodeReceived deem the auth code build an MSAL.NET confidential client application mplement token cache serialize AcquireTokenSilent
  • 19. Build a confidential client with MSAL .NET string authority = $"{_applicationOptions.Instance}tfp/“ +"{_microsoftIdentityOptions.Domain}/"+ "{_microsoftIdentityOptions.DefaultUserFlow}"; _application = ConfidentialClientApplicationBuilder .CreateWithApplicationOptions(_applicationOptions) .WithRedirectUri(currentUri) .WithB2CAuthority(authority) .WithHttpClientFactory(_httpClientFactory) .Build();
  • 20. Redeem the auth code with MSAL .NET
  • 21. Implement token cache serialization • Complex (security and performance implications) • Serialization depends on your needs - in memory, - database, - Redis etc …
  • 22. In the Controller, acquire a token with MSAL .NET
  • 23. Building blocks and integration points ASP.NET Core Web App or Web API ASP.NET Core framework ASP.NET Core OIDC middleware ASP.NET Core - JwtBearer middleware Core Components Microsoft.IdentityModel (Wilson) WsTrust… .NET Core