SlideShare a Scribd company logo
Use Azure Active Directory
Managed Identities for your
services!
@Jan_de_V
Jan de Vries
Cloud Solution Architect
So, how do YOU design
your solutions?
What to take into consideration?
Time to market
Complexity
Performance
Security
Availability
Maintainability
Cost
Team knowledge
…
Today’s topic
Security
Application Service Application Service
Application ServiceApplication Service
SQL Database
SQL Database
Storage Account
Service Bus
Yeah, we secured our services with…
•IP whitelisting
•A ‘secret’ code in the headers
•(self-signed) Certificates
•VNet with some NSGs
•Private Link
Introducing: Managed Identities
Using Azure Managed Identities for your App Services by Jan de Vries from 4DotNet at Azure focused 87th DevClub.lv
What I want to accomplish
API Speaker API
"identity": {
"type": "SystemAssigned"
},
Using Azure Managed Identities for your App Services by Jan de Vries from 4DotNet at Azure focused 87th DevClub.lv
var tenantId = this.configuration["ActiveDirectory:TenantId"];
var applicationIdUri = this.configuration["ApplicationIdUri"];
var azureServiceTokenProvider = new AzureServiceTokenProvider();
var accessToken = await azureServiceTokenProvider.GetAccessTokenAsync(
applicationIdUri,
tenantId: tenantId);
var httpClient = this.clientFactory.CreateClient();
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", accessToken);
var response = await httpClient.GetAsync(endpointUrlOfYourBackendService);
Using Azure Managed Identities for your App Services by Jan de Vries from 4DotNet at Azure focused 87th DevClub.lv
https://github.com/Azure/azure-sdk-for-net/issues/6172
Manifest
"appRoles": [
{
"allowedMemberTypes": [
"Application",
"User"
],
"description": "Reader Role",
"displayName": "Speaker service reader",
"id": "42ee5891-7e50-4db9-a6d9-75ffc8cc1e9b",
"isEnabled": true,
"lang": null,
"origin": "Application",
"value": "SecureApi.Speaker.Reader"
},
...
],
"Authentication": {
"Authority": "https://login.microsoftonline.com/[tenantId]",
"ClientId": "[theApplicationIdOfTheApplicationRegistration]",
"AppIdUri": "[theApplicationIDURI]"
}
app.UseAuthentication();
app.UseAuthorization();
services.AddAuthentication(o => {
o.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
})
.AddJwtBearer(o => {
o.Authority = Configuration["Authentication:Authority"];
o.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters
{
ValidAudiences = new List<string>
{
Configuration["Authentication:AppIdUri"],
Configuration["Authentication:ClientId"]
}
};
});
So, what do we have now?
Service 1
• We got a Managed Identity of the first service
• We’re making a HTTP call with an Authorization header
Service 2
• We have an App Registration
• We’ve added `appRoles` entries
• We’ve configured Authentication on the second service
az rest `
--method post `
--uri https://graph.microsoft.com/beta/servicePrincipals/91bc8c76-cddc-4f20-b82d-ec7df1d80827/appRoleAssignments `
--headers "{'content-type': 'application/json'}" `
--body "{
'appRoleId': '42ee5891-7e50-4db9-a6d9-75ffc8cc1e9b’, # identifier of your app role
'principalId': '717a6e6a-2d24-4954-9df1-88679da7c12e’, # object id of the Managed Identity
'principalType': 'ServicePrincipal’,
'resourceId': '91bc8c76-cddc-4f20-b82d-ec7df1d80827’ # the identifier Enterprise Application
}"
Using Azure Managed Identities for your App Services by Jan de Vries from 4DotNet at Azure focused 87th DevClub.lv
Questions, contact
https://github.com/Jandev
@Jan_de_V
jandv@4dotnet.nl
https://twitch.tv/jandev
https://jan-v.nl

More Related Content

PPTX
PDF
Network security with Azure PaaS services by Erwin Staal from 4DotNet at Azur...
PPTX
Intelligent Cloud Conference 2018 - Building secure cloud applications with A...
PPTX
Let's Talk About: Azure Networking
PPTX
Azure virtual network
PPTX
Shared Security Responsibility Model of AWS
PPTX
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
PPTX
Serverless beyond AWS Lambda
Network security with Azure PaaS services by Erwin Staal from 4DotNet at Azur...
Intelligent Cloud Conference 2018 - Building secure cloud applications with A...
Let's Talk About: Azure Networking
Azure virtual network
Shared Security Responsibility Model of AWS
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Serverless beyond AWS Lambda

What's hot (20)

PDF
Kubernetes Visualization-and-Monitoring-using-Weave-scope
PPTX
Azure Container Instance
PPTX
Azure network and infrastructure
PPTX
Managing your secrets in a cloud environment
PPTX
Azure Logic Apps
PPTX
Techniques for scaling application with security and visibility in cloud
PPTX
Get On Top of Azure Resource Security Using Secure DevOps Kit for Azure
PPTX
Azure Automation and Update Management
PDF
Develop enterprise-ready applications for Microsoft Teams
PDF
Understanding Azure Networking Services
PPTX
Microsoft Azure Networking Basics
PPTX
Azure Networking: Innovative Features and Multi-VNet Topologies
PDF
An Introduction to OpenStack
PDF
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
PPTX
AWS re:invent 2015
PPTX
Azure staticwebapps
PPTX
Cloud Bursting with A10 Lightning ADS
PDF
John Willis Cc Use Cases
PPTX
Azure Network Security Groups (NSG)
PPTX
DotnetConf - Cloud native and .Net5 announcements
Kubernetes Visualization-and-Monitoring-using-Weave-scope
Azure Container Instance
Azure network and infrastructure
Managing your secrets in a cloud environment
Azure Logic Apps
Techniques for scaling application with security and visibility in cloud
Get On Top of Azure Resource Security Using Secure DevOps Kit for Azure
Azure Automation and Update Management
Develop enterprise-ready applications for Microsoft Teams
Understanding Azure Networking Services
Microsoft Azure Networking Basics
Azure Networking: Innovative Features and Multi-VNet Topologies
An Introduction to OpenStack
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
AWS re:invent 2015
Azure staticwebapps
Cloud Bursting with A10 Lightning ADS
John Willis Cc Use Cases
Azure Network Security Groups (NSG)
DotnetConf - Cloud native and .Net5 announcements
Ad

Similar to Using Azure Managed Identities for your App Services by Jan de Vries from 4DotNet at Azure focused 87th DevClub.lv (20)

PDF
Next.Net event - Use Azure Active Directory Managed Identities for your servi...
PDF
24032022 Zero Trust for Developers Pub.pdf
PPTX
Zero credential development with managed identities
PPTX
Zero Credential Development with Managed Identities
PPTX
Zero Credential Development with Managed Identities
PPTX
SecureAzureServicesUsingADAuthentication.pptx
PDF
Modern Authentication With Azure Active Directory For Web Applications Develo...
PPTX
SC-900 Capabilities of Microsoft Identity and Access Management Solutions
PPTX
Zero Credential Development with Managed Identities
PPTX
Azure AD and Office 365 - Deja Vu All Over Again
PDF
Programming with Azure Active Directory
PPTX
Zero credential development with managed identities
PPTX
Zero Credential Development with Managed Identities for Azure resources
PPTX
Azure AD Presentation - @ BITPro - Ajay
PPTX
Azure-AD.pptx
PPTX
Microsoft Azure AD architecture and features
PPTX
Introduction to Azure AD and Azure AD B2C
PDF
Securing APIs for ultimate security and privacy with Azure | Codit Webinar
PDF
Protect your business with identity and access management in the cloud
PPTX
Azure from scratch part 2 By Girish Kalamati
Next.Net event - Use Azure Active Directory Managed Identities for your servi...
24032022 Zero Trust for Developers Pub.pdf
Zero credential development with managed identities
Zero Credential Development with Managed Identities
Zero Credential Development with Managed Identities
SecureAzureServicesUsingADAuthentication.pptx
Modern Authentication With Azure Active Directory For Web Applications Develo...
SC-900 Capabilities of Microsoft Identity and Access Management Solutions
Zero Credential Development with Managed Identities
Azure AD and Office 365 - Deja Vu All Over Again
Programming with Azure Active Directory
Zero credential development with managed identities
Zero Credential Development with Managed Identities for Azure resources
Azure AD Presentation - @ BITPro - Ajay
Azure-AD.pptx
Microsoft Azure AD architecture and features
Introduction to Azure AD and Azure AD B2C
Securing APIs for ultimate security and privacy with Azure | Codit Webinar
Protect your business with identity and access management in the cloud
Azure from scratch part 2 By Girish Kalamati
Ad

More from DevClub_lv (20)

PDF
Software Bill of Materials (SBOM): what you as a developer need to know by Kr...
PPTX
Mathematical Approaches and Algorithms for Data Stream Analysis by Arthur Tab...
PPTX
Fine-tuning Large Language Models by Dmitry Balabka
PDF
"Infrastructure and AWS at Scale: The story of Posti" by Goran Gjorgievski @ ...
PDF
From 50 to 500 product engineers – data-driven approach to building impactful...
PDF
Why is it so complex to accept a payment? by Dmitry Buzdin from A-Heads Consu...
PPTX
Do we need DDD? by Jurijs Čudnovskis from “Craftsmans Passion” at Fintech foc...
PPTX
SRE (service reliability engineer) on big DevOps platform running on the clou...
PPTX
Emergence of IOT & Cloud – Azure by Narendra Sharma at Cloud focused 76th Dev...
PDF
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
PDF
Building resilient frontend architecture by Monica Lent at FrontCon 2019
PPTX
Things that every JavaScript developer should know by Rachel Appel at FrontCo...
PPTX
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
PDF
Software Decision Making in Terms of Uncertainty by Ziv Levy at FrontCon 2019
PPTX
V8 by example: A journey through the compilation pipeline by Ujjwas Sharma at...
PDF
Bridging the gap between UX and development - A Storybook by Marko Letic at F...
PDF
Case-study: Frontend in Cybersecurity by Ruslan Zavacky by FrontCon 2019
PPTX
Building next generation PWA e-commerce frontend by Raivis Dejus at FrontCon ...
PPTX
Parcel – your next web application bundler? by Janis Koselevs at FrontCon 2019
PPTX
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Software Bill of Materials (SBOM): what you as a developer need to know by Kr...
Mathematical Approaches and Algorithms for Data Stream Analysis by Arthur Tab...
Fine-tuning Large Language Models by Dmitry Balabka
"Infrastructure and AWS at Scale: The story of Posti" by Goran Gjorgievski @ ...
From 50 to 500 product engineers – data-driven approach to building impactful...
Why is it so complex to accept a payment? by Dmitry Buzdin from A-Heads Consu...
Do we need DDD? by Jurijs Čudnovskis from “Craftsmans Passion” at Fintech foc...
SRE (service reliability engineer) on big DevOps platform running on the clou...
Emergence of IOT & Cloud – Azure by Narendra Sharma at Cloud focused 76th Dev...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Building resilient frontend architecture by Monica Lent at FrontCon 2019
Things that every JavaScript developer should know by Rachel Appel at FrontCo...
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
Software Decision Making in Terms of Uncertainty by Ziv Levy at FrontCon 2019
V8 by example: A journey through the compilation pipeline by Ujjwas Sharma at...
Bridging the gap between UX and development - A Storybook by Marko Letic at F...
Case-study: Frontend in Cybersecurity by Ruslan Zavacky by FrontCon 2019
Building next generation PWA e-commerce frontend by Raivis Dejus at FrontCon ...
Parcel – your next web application bundler? by Janis Koselevs at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019

Recently uploaded (20)

PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
MYSQL Presentation for SQL database connectivity
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Big Data Technologies - Introduction.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Advanced Soft Computing BINUS July 2025.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
cuic standard and advanced reporting.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Per capita expenditure prediction using model stacking based on satellite ima...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KodekX | Application Modernization Development
NewMind AI Monthly Chronicles - July 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
MYSQL Presentation for SQL database connectivity
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Using Azure Managed Identities for your App Services by Jan de Vries from 4DotNet at Azure focused 87th DevClub.lv