SlideShare a Scribd company logo
Consulting/Training
Azure Active Directory
An Introduction for Developers
Consulting/Training
John Garland
Microsoft MVP Windows Platform Development
Member Microsoft Azure Insider
Azure Mobile Services Advisory Board
Author Windows Store Apps Succinctly
Co-Author Programming the Windows Runtime by Example
MCPD Azure, Windows Developer, Windows Phone
MCTS Silverlight
jgarland@wintellect.com
@dotnetgator
Wintellect Principal Consultant
Consulting/Training
consulting
Wintellect helps you build better software, faster,
tackling the tough projects and solving the software
and technology questions that help you transform
your business.
 Architecture, Analysis and Design
 Full lifecycle software development
 Debugging and Performance tuning
 Database design and development
training
Wintellect's courses are written and taught by some of
the biggest and most respected names in the Microsoft
programming industry.
 Learn from the best. Access the same training
Microsoft’s developers enjoy
 Real world knowledge and solutions on both current
and cutting edge technologies
 Flexibility in training options – onsite, virtual, on
demand
Wintellect is the only company that offers the combined value of world class consulting services along with
onsite, virtual and on-demand developer training. We help companies build better software, faster, helping you
maximize and protect your consulting and training investments through ongoing knowledge transfer.
who we are
About Wintellect
Consulting/Training
 A Simple Demo – Adding Authentication to an ASP.NET MVC Application
 An Overview of Azure Active Directory
 The Developer Story
 Background – Integrating an Application’s Authentication with Azure Active Directory
 Demo – Working with the Azure Active Directory Graph API
 Demo – Calling a Secured Web API from a Secured Web App
 Demo – Calling a Secured Web API from a Native Client Application
 Wrapup
Agenda
Consulting/Training
Securing MVC Web Application Content with Azure Active Directory
Consulting/Training
 Created an app entry in an Azure
Active Directory tenant (and
some users)
 Used the OWIN middleware to
add authentication support to
the MVC Web App
 Configured the OWIN
middleware to know about the
AD app
What Have We Seen?
Consulting/Training
 Identity & Access Management as a Service
 You decide who the users are, what information is stored, who can get at it, who
can manage it, and what apps can use it.
 Microsoft is responsible for keeping it all running.
 Standalone, but can be synced with on-premises AD
 3 Editions: Free, Basic, Premium
 Application integration via support for several standard authentication
protocols (SAML 2.0, WS-Federation, Open ID Connect)
Azure Active Directory – What Is It?
Consulting/Training
No Object Limit No Object Limit
No Limit
Adv Security Reports
Yes (Advanced)**
Premium
+ Basic
Features
Group-based access management/provisioning Yes Yes
Self-Service Password Reset for cloud users Yes Yes
Company Branding (Logon Pages/Access Panel customization) Yes Yes
SLA Yes (99.9%) Yes (99.9%)
Consulting/Training
 Designed for “The Cloud” (as opposed to being retrofitted/adapted)
 REST Graph API with OData syntax for queries (instead of LDAP)
 Synchronize OR Connect to on-prem AD (ADFS is optional) via AAD Connect
 Sync
 User attributes synced using Identity Sync Services (includes a password hash)
 Authentication completes against AAD
 Connect
 User attributes synced vis Identity Sync Services
 Authentication passed back to local AD via ADFS and is completed locally
 Synchronize OR Connect to external SaaS applications
Azure Active Directory != Windows Active Directory
Consulting/Training
 Company Branding for Sign-In Screen
 Active Directory Application Proxy
 Access Control Services 2.0
 Multi-Factor Authentication
 Security Reporting and Alerts
 License Management
 Leverage Single Sign On with 2400+ 3rd party apps in the Azure AD
App Gallery
 Etc…
But Wait, There’s More!
Consulting/Training
 Applications
 Entities that rely on AAD for
Authentication
 Configuration Values:
 ClientID – Unique ID (GUID) for an application
 Application ID URI - Sent to AAD to indicate
the what the caller wants a token for
 ReplyURL - For web API or web application,
the location to which Azure AD will send the
authentication response
 Redirect URI – For an OAuth 2.0 request, a
unique identifier to which Azure AD will
redirect the user-agent
 Domains
 Default <tenant>.onmicrosoft.com
 A default domain is created with
your Azure Subscription for
managing Azure Management
Access
 Can also provision custom domain
names, use tenant ID, or use the
“custom” tenant
 Users
 Create in portal, via AAD PowerShell
cmdlet, or via sync
Azure Active Directory Development Terminology
Consulting/Training
 First Step – Stand up some middleware in front of the server
 Intercept requests and redirect if necessary to an Identity Provider (IdP).
 The IdP issues a token back to the client (browser, app), which is provided to the
server that is hosting the secured resource.
 The Server verifies the token with the IdP and – if valid – allows the request to
continue.
 Later
 Additional logic can request more information about the verified identity and
check to determine the resource in question can be accessed.
Fundamentals of Token-Based Web Authentication
Consulting/Training
OpenID Auth Code Authentication Flow
1 – Request Resource
2 – Redirect to IdP
3–RequestCode
4-Challenge/Response
5–ReturnanAccessCode
6 – Send Auth Code To Server
9:
Relying Party
(eg – Your Web App)
Client
(eg – Your Web Browser)
Identity Provider (IdP)
(eg – Azure Active Directory)
OAuth-A OAuth-T
Consulting/Training
 Then - Windows Identity Foundation (WIF)
 API for building claims-aware applications
 Configuration heavy, older tech, a product of a different era (WS-Fed)
 Authentication tooling in ASP.NET VS2013 Projects leverages WIF
 Now - “Katana” – Microsoft’s ASP.NET OWIN implementation.
 WS-Fed, OpenID Connect
 MUCH simpler to work with
 Hopefully VS Projects will get significant OWIN tooling “SOON”
ASP.NET Authentication Middleware
Consulting/Training
Azure AD Graph Client Library
 Wraps the REST API for Azure Active
Directory - Access objects such as
Users, Groups, Contacts, Tenant
Information, Roles, Applications,
Permissions
 OAuth 2.0 Support, supports both
Client Credentials and Authorization
Code flow
 Does not depend on ADAL, but
often used together
AD Authentication Library (ADAL)
 Authenticate users to AD and obtain
access tokens for securing API calls
 Manage token caching & lifetime
 Works with Azure AD, Windows
Server ADFS for Windows Server
2012 R2, and ACS
 Available for .NET, Windows Store
(WinRT), Node.js
 V3.0 (Pre) is a PCL with support for WinRT,
Xamarin iOS, Xamarin Android)
Tools for Working with Azure Active Directory
Consulting/Training
Calling the Graph API from an Authenticated MVC Web Site Endpoint
Consulting/Training
 The previous example looked at
 Securing one or more endpoints of an ASP.NET MVC app
 Using parts of the work done to authenticate the MVC App endpoint to also
access the Azure AD Graph
 Now What If
 The Web App needs to call a secured Web API? As the App? As the User?
 A Native Client App needs to call the same secured Web API?
Now What If…
Consulting/Training
Flowing authentication from a Web App to a Web Service
Calling the same Web Service from a Native Client Application
Consulting/Training
 Using OWIN Middleware to add
AAD-based authentication to an
MVC Web App endpoint
 Using Web App authentication
credentials to call the AAD Graph
API
 Using Web App authentication
credentials to call a Web API service
as both a user and an app
 Calling a Web API that requires
authentication from a Native App
What Have We Seen
Consulting/Training
 APIs and Sample Code
 Azure AD Authentication Library for
.NET - http://msdn.microsoft.com/en-
us/library/azure/jj573266.aspx
 Azure AD Graph API -
http://msdn.microsoft.com/en-
us/library/azure/hh974476.aspx
 Azure Active Directory Code Samples -
http://msdn.microsoft.com/en-
us/library/azure/dn646737.aspx
 Claims
 A Guide to Claims-Based Identity and
Access Control (2nd Edition) -
http://msdn.microsoft.com/en-
us/library/ff423674.aspx
 Azure Active Directory Videos
 Channel 9 AAD Series -
http://channel9.msdn.com/Series/Wind
ows-Azure-Active-Directory
 TechEd Europe 2014 -
http://channel9.msdn.com/Events/TechE
d/Europe/2014?tag=microsoft-azure-
active-directory
Resources
Consulting/Training
 Native Clients
 WPF calling Web API
 WinRT Calling WebAPI
 Call Web API, calling another WebAPI
 Xamarin – Multiple OS’s
 Headless calling Web API
 Daemons (Services)
 Calling WebAPI (Password & Certificate)
 .NET Web Apps
 Call via OpenID Connect & WS-Fed
 App calls Web API via OpenID Connect,
OAuth2 (App & User Identities)
 SPAs
 JavaScript client calling to .NET service
 Calling Azure AD Graph API
 RBAC via Groups and Roles
Azure AD Samples
And many more…
Consulting/Training
 Get to know the basic concepts of distributed application
authentication
 Get familiar with the lay-of-the-land of the AAD Samples
 See if your needs [align with || can be slightly pivoted to align with] the
concepts shown in the AAD Samples, and then use them as a roadmap
 If you’re a .NET developer, focus on leveraging the ASP.NET OWIN
(“Katana”) middleware components in your applications (unless you are
already moving forward to vNext)
$0.05 of Advice
Consulting/Training
Thank You

More Related Content

What's hot (20)

PPTX
NIC 2017 Did you like Azure RMS? You will like Azure Information Protection e...
Morgan Simonsen
 
PPTX
Microsoft Azure Identity and O365
Kris Wagner
 
PPTX
Windows azure active directory
Krunal Trivedi
 
PPTX
EWUG - Azure AD Pass-through Authentication and Seamless Single Sign-On
Peter Selch Dahl
 
PPTX
Azure AD App Proxy Login Scenarios with an On Premises Applications - TSPUG
Roy Kim
 
PPTX
Identity and o365 on Azure
Mostafa
 
PPTX
Azure Global Bootcamp 2017 Azure AD Deployment
Anthony Clendenen
 
PPTX
Identity Management for Office 365 and Microsoft Azure
Sparkhound Inc.
 
PPTX
JoTechies - Cloud identity
JoTechies
 
PPTX
Windows Azure Active Directory
Pavel Revenkov
 
PPTX
Azure AD with Office 365 and Beyond!
Ravikumar Sathyamurthy
 
PPTX
Securing your Azure Identity Infrastructure
Vignesh Ganesan I Microsoft MVP
 
PDF
Colabora.dk - Azure PTA vs ADFS vs Desktop SSO
Peter Selch Dahl
 
PPTX
Protect Identities and Access to resources with Azure Active Directory
Vignesh Ganesan I Microsoft MVP
 
PPTX
ADFS + IAM
Richard Harvey
 
PDF
Access Security - Privileged Identity Management
Eng Teong Cheah
 
PPTX
Get your site microsoft edge ready
Mostafa
 
PPTX
Hitchhiker's Guide to Azure AD - SPSKC
Max Fritz
 
PPTX
SPSNL17 - Securing Office 365 and Microsoft Azure like a rock star (or groupi...
DIWUG
 
NIC 2017 Did you like Azure RMS? You will like Azure Information Protection e...
Morgan Simonsen
 
Microsoft Azure Identity and O365
Kris Wagner
 
Windows azure active directory
Krunal Trivedi
 
EWUG - Azure AD Pass-through Authentication and Seamless Single Sign-On
Peter Selch Dahl
 
Azure AD App Proxy Login Scenarios with an On Premises Applications - TSPUG
Roy Kim
 
Identity and o365 on Azure
Mostafa
 
Azure Global Bootcamp 2017 Azure AD Deployment
Anthony Clendenen
 
Identity Management for Office 365 and Microsoft Azure
Sparkhound Inc.
 
JoTechies - Cloud identity
JoTechies
 
Windows Azure Active Directory
Pavel Revenkov
 
Azure AD with Office 365 and Beyond!
Ravikumar Sathyamurthy
 
Securing your Azure Identity Infrastructure
Vignesh Ganesan I Microsoft MVP
 
Colabora.dk - Azure PTA vs ADFS vs Desktop SSO
Peter Selch Dahl
 
Protect Identities and Access to resources with Azure Active Directory
Vignesh Ganesan I Microsoft MVP
 
ADFS + IAM
Richard Harvey
 
Access Security - Privileged Identity Management
Eng Teong Cheah
 
Get your site microsoft edge ready
Mostafa
 
Hitchhiker's Guide to Azure AD - SPSKC
Max Fritz
 
SPSNL17 - Securing Office 365 and Microsoft Azure like a rock star (or groupi...
DIWUG
 

Viewers also liked (13)

PPT
Active Directory Training
Nishad Sukumaran
 
PPT
Active Directory
Sandeep Kapadane
 
PPTX
A Developer's Introduction to Azure Active Directory B2C
John Garland
 
PPTX
Introduction to Active Directory
thoms1i
 
PPTX
Windows Server 2008 Active Directory
anilinvns
 
PPTX
Windows Azure Active Directory: Identity Management in the Cloud
Chris Dufour
 
PPTX
7 tips to simplify Active Directory Management ​
Zoho Corporation
 
PPTX
Customer First: From Data to Insights to Impact
delaware BeLux
 
PPT
Domain Name Server
vipulvaid
 
DOCX
Sql Server 2012 Installation..
Anand Kumar Rajana
 
PPTX
How to install SQLSERVER 2012
Andre Nascimento
 
PDF
MCITP
Naqib Khan
 
PPTX
What is active directory
Adeel Khurram
 
Active Directory Training
Nishad Sukumaran
 
Active Directory
Sandeep Kapadane
 
A Developer's Introduction to Azure Active Directory B2C
John Garland
 
Introduction to Active Directory
thoms1i
 
Windows Server 2008 Active Directory
anilinvns
 
Windows Azure Active Directory: Identity Management in the Cloud
Chris Dufour
 
7 tips to simplify Active Directory Management ​
Zoho Corporation
 
Customer First: From Data to Insights to Impact
delaware BeLux
 
Domain Name Server
vipulvaid
 
Sql Server 2012 Installation..
Anand Kumar Rajana
 
How to install SQLSERVER 2012
Andre Nascimento
 
MCITP
Naqib Khan
 
What is active directory
Adeel Khurram
 
Ad

Similar to Azure Active Directory - An Introduction for Developers (20)

PDF
Modern Authentication With Azure Active Directory For Web Applications Develo...
ikhinesagang32
 
PDF
Programming with Azure Active Directory
Joonas Westlin
 
PPTX
Introduction to Azure AD and Azure AD B2C
Joonas Westlin
 
PPTX
Using Windows Azure for Solving Identity Management Challenges
Michael Collier
 
PDF
Using Windows Azure for Solving Identity Management Challenges (Visual Studio...
Michael Collier
 
PPTX
Azure from scratch part 2 By Girish Kalamati
Girish Kalamati
 
PPTX
Microsoft Azure AD architecture and features
ssuser381403
 
PPTX
Azure-AD.pptx
ssuser9dddf7
 
PDF
24032022 Zero Trust for Developers Pub.pdf
Tomasz Kopacz
 
PDF
04_Extending and Securing Enterprise Applications in Microsoft Azure_GAB2019
Kumton Suttiraksiri
 
PDF
Identity and Access Management from Microsoft and Razor Technology
David J Rosenthal
 
PPTX
Developing Apps with Azure AD
SharePointRadi
 
PPTX
Azure - Identity as a service
BizTalk360
 
PPTX
SAFwAD @ Intelligent Cloud Conference
Rick van den Bosch
 
PDF
Learn these 10 core skills for Enterprise Mobility to future proof your enter...
Mohamed Mahdy
 
PPTX
Análisis de riesgos en Azure y protección de la información
Plain Concepts
 
PPTX
Multi-Factor Authentication for your clouds
Alexandre Verkinderen
 
PPTX
Programming Azure Active Directory (DevLink 2014)
Michael Collier
 
PPTX
Understanding Office 365’s Identity Solutions: Deep Dive - EPC Group
EPC Group
 
PPTX
DotNet 2019 | Hugo Biarge - Autenticación en aplicaciones web y nativas
Plain Concepts
 
Modern Authentication With Azure Active Directory For Web Applications Develo...
ikhinesagang32
 
Programming with Azure Active Directory
Joonas Westlin
 
Introduction to Azure AD and Azure AD B2C
Joonas Westlin
 
Using Windows Azure for Solving Identity Management Challenges
Michael Collier
 
Using Windows Azure for Solving Identity Management Challenges (Visual Studio...
Michael Collier
 
Azure from scratch part 2 By Girish Kalamati
Girish Kalamati
 
Microsoft Azure AD architecture and features
ssuser381403
 
Azure-AD.pptx
ssuser9dddf7
 
24032022 Zero Trust for Developers Pub.pdf
Tomasz Kopacz
 
04_Extending and Securing Enterprise Applications in Microsoft Azure_GAB2019
Kumton Suttiraksiri
 
Identity and Access Management from Microsoft and Razor Technology
David J Rosenthal
 
Developing Apps with Azure AD
SharePointRadi
 
Azure - Identity as a service
BizTalk360
 
SAFwAD @ Intelligent Cloud Conference
Rick van den Bosch
 
Learn these 10 core skills for Enterprise Mobility to future proof your enter...
Mohamed Mahdy
 
Análisis de riesgos en Azure y protección de la información
Plain Concepts
 
Multi-Factor Authentication for your clouds
Alexandre Verkinderen
 
Programming Azure Active Directory (DevLink 2014)
Michael Collier
 
Understanding Office 365’s Identity Solutions: Deep Dive - EPC Group
EPC Group
 
DotNet 2019 | Hugo Biarge - Autenticación en aplicaciones web y nativas
Plain Concepts
 
Ad

More from John Garland (10)

PPTX
Don't Fly Blind - Implementing Effective Application Instrumentation with Azu...
John Garland
 
PPTX
DevOps > CI + CD. A web developer's introduction to Application Insights
John Garland
 
PPTX
Easy Copy with AZ Copy
John Garland
 
PPTX
Putting the Cloud in Your Pocket with Azure Mobile Services (.NET)
John Garland
 
PPTX
Nashua Cloud .NET User Group - Basic WP8 App Dev With XAML and C#, April 2013
John Garland
 
PPTX
NE Code Camp 14 - Introduction to Windows Phone 7 development with Silverlight
John Garland
 
PPTX
VT Code Camp 2010 - Introduction to windows phone 7 development with silverlight
John Garland
 
PPTX
NH .Net Code Camp 2010 - An Introduction to Windows Phone 7 Development with ...
John Garland
 
PPTX
NH .Net Code Camp 2010 - Silverlight business applications
John Garland
 
PPTX
NH .Net Code Camp 2010 - An Introduction to Silverlight Development
John Garland
 
Don't Fly Blind - Implementing Effective Application Instrumentation with Azu...
John Garland
 
DevOps > CI + CD. A web developer's introduction to Application Insights
John Garland
 
Easy Copy with AZ Copy
John Garland
 
Putting the Cloud in Your Pocket with Azure Mobile Services (.NET)
John Garland
 
Nashua Cloud .NET User Group - Basic WP8 App Dev With XAML and C#, April 2013
John Garland
 
NE Code Camp 14 - Introduction to Windows Phone 7 development with Silverlight
John Garland
 
VT Code Camp 2010 - Introduction to windows phone 7 development with silverlight
John Garland
 
NH .Net Code Camp 2010 - An Introduction to Windows Phone 7 Development with ...
John Garland
 
NH .Net Code Camp 2010 - Silverlight business applications
John Garland
 
NH .Net Code Camp 2010 - An Introduction to Silverlight Development
John Garland
 

Recently uploaded (20)

PPTX
For my supp to finally picking supp that work
necas19388
 
PDF
Azure AI Foundry: The AI app and agent factory
Maxim Salnikov
 
PPTX
arctitecture application system design os dsa
za241967
 
PPTX
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
BradBedford3
 
PDF
Humans vs AI Call Agents - Qcall.ai's Special Report
Udit Goenka
 
PPTX
Agentforce – TDX 2025 Hackathon Achievement
GetOnCRM Solutions
 
PPTX
IObit Driver Booster Pro 12 Crack Latest Version Download
pcprocore
 
PDF
The Rise of Sustainable Mobile App Solutions by New York Development Firms
ostechnologies16
 
PPTX
Introduction to web development | MERN Stack
JosephLiyon
 
PDF
Rewards and Recognition (2).pdf
ethan Talor
 
PDF
Automated Testing and Safety Analysis of Deep Neural Networks
Lionel Briand
 
PDF
IObit Uninstaller Pro 14.3.1.8 Crack for Windows Latest
utfefguu
 
PPTX
Iobit Driver Booster Pro 12 Crack Free Download
chaudhryakashoo065
 
PDF
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
PDF
Best Practice for LLM Serving in the Cloud
Alluxio, Inc.
 
PDF
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
PDF
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
Lionel Briand
 
PDF
Building scalbale cloud native apps with .NET 8
GillesMathieu10
 
PPTX
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
PPTX
Wondershare Filmora Crack 14.5.18 + Key Full Download [Latest 2025]
HyperPc soft
 
For my supp to finally picking supp that work
necas19388
 
Azure AI Foundry: The AI app and agent factory
Maxim Salnikov
 
arctitecture application system design os dsa
za241967
 
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
BradBedford3
 
Humans vs AI Call Agents - Qcall.ai's Special Report
Udit Goenka
 
Agentforce – TDX 2025 Hackathon Achievement
GetOnCRM Solutions
 
IObit Driver Booster Pro 12 Crack Latest Version Download
pcprocore
 
The Rise of Sustainable Mobile App Solutions by New York Development Firms
ostechnologies16
 
Introduction to web development | MERN Stack
JosephLiyon
 
Rewards and Recognition (2).pdf
ethan Talor
 
Automated Testing and Safety Analysis of Deep Neural Networks
Lionel Briand
 
IObit Uninstaller Pro 14.3.1.8 Crack for Windows Latest
utfefguu
 
Iobit Driver Booster Pro 12 Crack Free Download
chaudhryakashoo065
 
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
Best Practice for LLM Serving in the Cloud
Alluxio, Inc.
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
Lionel Briand
 
Building scalbale cloud native apps with .NET 8
GillesMathieu10
 
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
Wondershare Filmora Crack 14.5.18 + Key Full Download [Latest 2025]
HyperPc soft
 

Azure Active Directory - An Introduction for Developers

  • 1. Consulting/Training Azure Active Directory An Introduction for Developers
  • 2. Consulting/Training John Garland Microsoft MVP Windows Platform Development Member Microsoft Azure Insider Azure Mobile Services Advisory Board Author Windows Store Apps Succinctly Co-Author Programming the Windows Runtime by Example MCPD Azure, Windows Developer, Windows Phone MCTS Silverlight [email protected] @dotnetgator Wintellect Principal Consultant
  • 3. Consulting/Training consulting Wintellect helps you build better software, faster, tackling the tough projects and solving the software and technology questions that help you transform your business.  Architecture, Analysis and Design  Full lifecycle software development  Debugging and Performance tuning  Database design and development training Wintellect's courses are written and taught by some of the biggest and most respected names in the Microsoft programming industry.  Learn from the best. Access the same training Microsoft’s developers enjoy  Real world knowledge and solutions on both current and cutting edge technologies  Flexibility in training options – onsite, virtual, on demand Wintellect is the only company that offers the combined value of world class consulting services along with onsite, virtual and on-demand developer training. We help companies build better software, faster, helping you maximize and protect your consulting and training investments through ongoing knowledge transfer. who we are About Wintellect
  • 4. Consulting/Training  A Simple Demo – Adding Authentication to an ASP.NET MVC Application  An Overview of Azure Active Directory  The Developer Story  Background – Integrating an Application’s Authentication with Azure Active Directory  Demo – Working with the Azure Active Directory Graph API  Demo – Calling a Secured Web API from a Secured Web App  Demo – Calling a Secured Web API from a Native Client Application  Wrapup Agenda
  • 5. Consulting/Training Securing MVC Web Application Content with Azure Active Directory
  • 6. Consulting/Training  Created an app entry in an Azure Active Directory tenant (and some users)  Used the OWIN middleware to add authentication support to the MVC Web App  Configured the OWIN middleware to know about the AD app What Have We Seen?
  • 7. Consulting/Training  Identity & Access Management as a Service  You decide who the users are, what information is stored, who can get at it, who can manage it, and what apps can use it.  Microsoft is responsible for keeping it all running.  Standalone, but can be synced with on-premises AD  3 Editions: Free, Basic, Premium  Application integration via support for several standard authentication protocols (SAML 2.0, WS-Federation, Open ID Connect) Azure Active Directory – What Is It?
  • 8. Consulting/Training No Object Limit No Object Limit No Limit Adv Security Reports Yes (Advanced)** Premium + Basic Features Group-based access management/provisioning Yes Yes Self-Service Password Reset for cloud users Yes Yes Company Branding (Logon Pages/Access Panel customization) Yes Yes SLA Yes (99.9%) Yes (99.9%)
  • 9. Consulting/Training  Designed for “The Cloud” (as opposed to being retrofitted/adapted)  REST Graph API with OData syntax for queries (instead of LDAP)  Synchronize OR Connect to on-prem AD (ADFS is optional) via AAD Connect  Sync  User attributes synced using Identity Sync Services (includes a password hash)  Authentication completes against AAD  Connect  User attributes synced vis Identity Sync Services  Authentication passed back to local AD via ADFS and is completed locally  Synchronize OR Connect to external SaaS applications Azure Active Directory != Windows Active Directory
  • 10. Consulting/Training  Company Branding for Sign-In Screen  Active Directory Application Proxy  Access Control Services 2.0  Multi-Factor Authentication  Security Reporting and Alerts  License Management  Leverage Single Sign On with 2400+ 3rd party apps in the Azure AD App Gallery  Etc… But Wait, There’s More!
  • 11. Consulting/Training  Applications  Entities that rely on AAD for Authentication  Configuration Values:  ClientID – Unique ID (GUID) for an application  Application ID URI - Sent to AAD to indicate the what the caller wants a token for  ReplyURL - For web API or web application, the location to which Azure AD will send the authentication response  Redirect URI – For an OAuth 2.0 request, a unique identifier to which Azure AD will redirect the user-agent  Domains  Default <tenant>.onmicrosoft.com  A default domain is created with your Azure Subscription for managing Azure Management Access  Can also provision custom domain names, use tenant ID, or use the “custom” tenant  Users  Create in portal, via AAD PowerShell cmdlet, or via sync Azure Active Directory Development Terminology
  • 12. Consulting/Training  First Step – Stand up some middleware in front of the server  Intercept requests and redirect if necessary to an Identity Provider (IdP).  The IdP issues a token back to the client (browser, app), which is provided to the server that is hosting the secured resource.  The Server verifies the token with the IdP and – if valid – allows the request to continue.  Later  Additional logic can request more information about the verified identity and check to determine the resource in question can be accessed. Fundamentals of Token-Based Web Authentication
  • 13. Consulting/Training OpenID Auth Code Authentication Flow 1 – Request Resource 2 – Redirect to IdP 3–RequestCode 4-Challenge/Response 5–ReturnanAccessCode 6 – Send Auth Code To Server 9: Relying Party (eg – Your Web App) Client (eg – Your Web Browser) Identity Provider (IdP) (eg – Azure Active Directory) OAuth-A OAuth-T
  • 14. Consulting/Training  Then - Windows Identity Foundation (WIF)  API for building claims-aware applications  Configuration heavy, older tech, a product of a different era (WS-Fed)  Authentication tooling in ASP.NET VS2013 Projects leverages WIF  Now - “Katana” – Microsoft’s ASP.NET OWIN implementation.  WS-Fed, OpenID Connect  MUCH simpler to work with  Hopefully VS Projects will get significant OWIN tooling “SOON” ASP.NET Authentication Middleware
  • 15. Consulting/Training Azure AD Graph Client Library  Wraps the REST API for Azure Active Directory - Access objects such as Users, Groups, Contacts, Tenant Information, Roles, Applications, Permissions  OAuth 2.0 Support, supports both Client Credentials and Authorization Code flow  Does not depend on ADAL, but often used together AD Authentication Library (ADAL)  Authenticate users to AD and obtain access tokens for securing API calls  Manage token caching & lifetime  Works with Azure AD, Windows Server ADFS for Windows Server 2012 R2, and ACS  Available for .NET, Windows Store (WinRT), Node.js  V3.0 (Pre) is a PCL with support for WinRT, Xamarin iOS, Xamarin Android) Tools for Working with Azure Active Directory
  • 16. Consulting/Training Calling the Graph API from an Authenticated MVC Web Site Endpoint
  • 17. Consulting/Training  The previous example looked at  Securing one or more endpoints of an ASP.NET MVC app  Using parts of the work done to authenticate the MVC App endpoint to also access the Azure AD Graph  Now What If  The Web App needs to call a secured Web API? As the App? As the User?  A Native Client App needs to call the same secured Web API? Now What If…
  • 18. Consulting/Training Flowing authentication from a Web App to a Web Service Calling the same Web Service from a Native Client Application
  • 19. Consulting/Training  Using OWIN Middleware to add AAD-based authentication to an MVC Web App endpoint  Using Web App authentication credentials to call the AAD Graph API  Using Web App authentication credentials to call a Web API service as both a user and an app  Calling a Web API that requires authentication from a Native App What Have We Seen
  • 20. Consulting/Training  APIs and Sample Code  Azure AD Authentication Library for .NET - http://msdn.microsoft.com/en- us/library/azure/jj573266.aspx  Azure AD Graph API - http://msdn.microsoft.com/en- us/library/azure/hh974476.aspx  Azure Active Directory Code Samples - http://msdn.microsoft.com/en- us/library/azure/dn646737.aspx  Claims  A Guide to Claims-Based Identity and Access Control (2nd Edition) - http://msdn.microsoft.com/en- us/library/ff423674.aspx  Azure Active Directory Videos  Channel 9 AAD Series - http://channel9.msdn.com/Series/Wind ows-Azure-Active-Directory  TechEd Europe 2014 - http://channel9.msdn.com/Events/TechE d/Europe/2014?tag=microsoft-azure- active-directory Resources
  • 21. Consulting/Training  Native Clients  WPF calling Web API  WinRT Calling WebAPI  Call Web API, calling another WebAPI  Xamarin – Multiple OS’s  Headless calling Web API  Daemons (Services)  Calling WebAPI (Password & Certificate)  .NET Web Apps  Call via OpenID Connect & WS-Fed  App calls Web API via OpenID Connect, OAuth2 (App & User Identities)  SPAs  JavaScript client calling to .NET service  Calling Azure AD Graph API  RBAC via Groups and Roles Azure AD Samples And many more…
  • 22. Consulting/Training  Get to know the basic concepts of distributed application authentication  Get familiar with the lay-of-the-land of the AAD Samples  See if your needs [align with || can be slightly pivoted to align with] the concepts shown in the AAD Samples, and then use them as a roadmap  If you’re a .NET developer, focus on leveraging the ASP.NET OWIN (“Katana”) middleware components in your applications (unless you are already moving forward to vNext) $0.05 of Advice

Editor's Notes

  • #8: NOTE – “Free” is not (currently) limited to Dev/Test as some other Free service tiers are
  • #9: Source: “Azure AD Explained” talk from TechEd EU 2014 Azure AD Premium Trial - 100 user licenses for 90 days
  • #11: License management is currently limited to seats for Enterprise Mobility Suite (Intune, Azure AD RMS, Azure AD Premium), Azure AD Premium, Azure AD Basic, Office 365
  • #14: http://openid.net/specs/openid-connect-core-1_0.html#CodeFlowSteps Also Vittorio at TE-EU 1/2 – Anonymous request results in a 302, with a redirect to the IdP 3 – Authenticate starts with request for an access code, which usually results in a challenge page (logon page). 4/5 - When the challenge is met, the access code is issued 6 – The request is then remade, passing along the code 7/8 – The server then requests a token, using the code as “collateral”, and if the Code is OK, a pair of tokens (A & R) are returned 9 – A Cookie is issued to the browser to establish use for the session
  • #15: WIF - Formerly known as “Geneva” Opinion – VS2013 & WIF Authentication tooling is simply horrible – a cacophony of web.config entries, “mystery method” overrides, a database of dubious usefulness, and a whole lot of ceremony.