In this episode, we break down the essential steps for securing web applications on Microsoft Azure, focusing on Azure App Service and its built-in security capabilities. You’ll learn what Azure App Service is, why it’s a powerful platform-as-a-service (PaaS) option, and how it simplifies deployment, scaling, and management of web apps, APIs, and mobile apps. We also highlight the key benefits of using Azure—including automatic updates, integrated security features, and seamless scalability.

We walk through the core features of Azure Web Apps, such as authentication and authorization options, IP restrictions, TLS encryption, Azure DDoS protection, and integration with tools like Azure Front Door, Azure SQL Database, and Microsoft Entra ID. You’ll also hear how to get started with App Service, choose the right App Service Plan, manage deployments, and follow best practices with CI/CD pipelines, managed identities, and secure secret storage using Azure Key Vault.

The episode also covers network security fundamentals, including using Azure Virtual Network, Network Security Groups, private endpoints, and App Service Environment for isolation. You’ll learn how to strengthen your app’s protection using Azure Application Gateway, Web Application Firewall (WAF), and strict access controls.

Finally, we explore advanced security techniques such as monitoring with Azure Monitor and Security Center, performing regular security audits, and staying up to date with Azure’s evolving security features. Whether you're building new cloud apps or securing existing workloads, this episode gives you a clear roadmap for deploying and protecting web applications on Azure using industry best practices.

Apple Podcasts podcast player iconSpotify podcast player iconYoutube Music podcast player iconSpreaker podcast player iconPodchaser podcast player iconAmazon Music podcast player icon

In today's digital world, password security poses significant risks. Recent statistics reveal alarming trends: weak passwords contribute to 30% of global data breaches, and 81% of company breaches arise from poor password practices. With 80% of breaches linked to passwords, it's clear that traditional methods fail to protect sensitive information. As such, many organizations are choosing to ditch passwords in favor of passwordless authentication. This innovative approach enhances security by eliminating the need for passwords altogether, reducing vulnerabilities and protecting your data more effectively.

Key Takeaways

  • Passwordless authentication significantly reduces the risk of data breaches caused by weak passwords.
  • Azure offers various passwordless solutions, such as FIDO2 security keys, to enhance security and streamline access.
  • Managed identities in Azure eliminate the need for storing sensitive credentials, improving overall security.
  • Transitioning to passwordless authentication can lead to cost savings and operational efficiencies for organizations.
  • Implementing multifactor authentication (MFA) adds an extra layer of security to your Azure environment.
  • Regular monitoring and auditing of access logs help identify and respond to potential security threats.
  • Using Azure Key Vault allows for secure management of sensitive information, ensuring only authorized access.
  • Following best practices during the transition to passwordless solutions enhances security and user experience.

Risks of Passwords

Risks of Passwords

Common Vulnerabilities

Passwords often create weak points in your security system. Attackers exploit these weaknesses to gain unauthorized access. Below is a table showing common vulnerabilities linked to traditional password use:

Vulnerability TypeDescription
Insecure password verification methodsUsing weak hash functions like MD5 allows attackers to retrieve passwords from stolen hashes.
Poor password security enforcementAllowing weak or common passwords increases the chance of account compromise.

In addition, weak login credentials remain a major problem. Predictable passwords make it easy for attackers to guess or crack your passwords. These vulnerabilities put your data and systems at risk.

User Behavior

Your behavior plays a big role in password security. Many people reuse the same password across multiple accounts. Recent surveys show that between 60% and 85% of users reuse passwords, increasing the risk of widespread breaches:

SourcePercentage Reusing Passwords
Bitdefender BlogOver 60%
Enzoic Blog65%
Bitwarden World Password Day Survey85%
Business Journal Survey84%

Phishing attacks also take advantage of human psychology. Cybercriminals send fake emails or messages that look real to trick you into revealing your login details. These attacks often disguise themselves as trusted contacts, making it easier to fool you. AI technology now helps criminals create even more convincing phishing attempts.

Poor password management adds to the problem. Many employees share passwords with colleagues or write them down because they find it hard to remember complex passwords. This behavior creates security gaps that attackers can exploit. Help desks spend 25% to 40% of their time fixing password issues, costing companies between $17 and $70 per reset.

Cost of Breaches

Password-related breaches cost companies a lot of money. In 2024, the average financial loss from such breaches reached about $4.88 million worldwide. This number rose by 10% compared to the previous year, showing how costly password failures have become.

Beyond money, breaches damage your company’s reputation. Customers lose trust quickly after a breach. About one in three consumers stop doing business with a company after a breach becomes public. Around 85% share their bad experiences with others, and 33% post complaints on social media. These reactions lead to lost revenue and long-term harm to your brand.

Note: The financial and reputational costs of password breaches highlight the urgent need to improve your security by moving away from traditional passwords.

Ditch Passwords with Azure

Passwordless Solutions

Azure offers a range of passwordless authentication solutions that enhance your security posture. By leveraging these solutions, you can effectively ditch passwords and reduce vulnerabilities. Here are some key options available through Azure:

  • Thales FIDO2 security keys: These keys integrate seamlessly with Azure Active Directory (AD), providing a highly secure method for authentication without the need for passwords.
  • Integration with Microsoft Entra: This feature enhances security by minimizing the risk of unauthorized access to Microsoft environments and SaaS applications.
  • Proven FIDO2 phishing-resistant authentication: This method can be integrated with Identity and Access Management (IAM) environments, ensuring robust protection against common cyber threats.
  • Passwordless authentication: This approach helps protect against common entry points for cyberattacks, making your systems more resilient.

By adopting these passwordless solutions, you not only enhance security but also streamline user access, making it easier for your team to work efficiently.

Benefits of Azure Security

Transitioning to Azure's passwordless authentication brings numerous benefits. Here are some key advantages:

  • Elimination of vulnerabilities: Passwordless authentication removes the risks associated with traditional passwords, such as phishing, credential stuffing, and brute-force attacks. You replace passwords with stronger methods like biometrics, smart cards, and mobile authenticators, significantly reducing the risk of unauthorized access.
  • Alignment with Zero Trust security model: Azure Active Directory’s passwordless approach aligns with the Zero Trust security model, enhancing your overall cybersecurity framework.
  • Compliance and auditing support: Azure provides robust reporting features that support compliance and auditing, which are critical for regulatory adherence.
  • Scalability and adaptability: Azure's passwordless solutions allow for easy integration with existing systems and future technologies, ensuring your organization remains agile in a rapidly changing digital landscape.

Organizations that have adopted Azure passwordless solutions report measurable security benefits. For instance, they experience a significant reduction in credential compromise alerts, phishing simulation failure rates, and help desk password reset tickets. A recent case study showed that the New Jersey Judiciary achieved an estimated $10.7 million ROI through reduced technology costs and operational efficiencies after implementing passwordless authentication.

Managed Identities in Azure

What are Managed Identities?

When you build applications or services in azure, you often need to access other resources securely. Traditionally, you might use passwords or secrets to authenticate. However, managing these secrets can be risky and complicated. Azure solves this problem with managed identities. A managed identity is a special identity created and managed by azure that allows your applications to authenticate to other azure services without storing any credentials. This means you do not have to handle secrets like passwords or API keys manually.

Managed identities improve your data security by eliminating static credentials that attackers can steal or misuse. Instead, azure issues short-lived access tokens that your app uses to prove its identity. These tokens expire quickly, reducing the chance of credential reuse. Also, managed identities work with role-based access control (RBAC), so you can give your app only the permissions it needs. This limits the damage if a security breach happens. By using managed identities, you simplify secret management and reduce the risk of exposing sensitive data.

Types of Managed Identities

Azure offers two types of managed identities: system-assigned and user-assigned. Each type serves different purposes depending on your security needs and how you manage your resources.

System-Assigned

A system-assigned managed identity is created and managed automatically by azure. When you enable it on an azure resource, such as a virtual machine or an app service, azure creates an identity tied directly to that resource. This identity exists only as long as the resource exists. If you delete the resource, azure deletes the identity too. This one-to-one relationship makes system-assigned identities ideal for scenarios where you want the identity to live and die with the resource.

You configure system-assigned identities easily through the azure portal. They provide a simple way to secure your applications without worrying about managing secrets or credentials. Use system-assigned identities when your app or service needs a dedicated identity that should not outlive the resource.

User-Assigned

User-assigned managed identities differ because you create and manage them independently of any specific resource. You create a user-assigned identity as a standalone azure resource. Then, you can assign this identity to one or more azure services. This means you can share the same identity across multiple resources.

User-assigned identities remain active even if you delete the resources that use them. This feature makes them perfect for scenarios where you want consistent permissions across several services or apps. You manage user-assigned identities separately, giving you more control over their lifecycle.

Here is a comparison table to help you understand the differences between system-assigned and user-assigned managed identities:

FeatureSystem-Assigned IdentityUser-Assigned Identity
CreationCreated and managed by azure, tied to the lifecycle of the service instance.Created by you as a standalone azure resource, can be assigned to multiple services.
DeletionAutomatically deleted when the associated resource is deleted.Managed separately; remains even if the resource using it is deleted.
Relationship1:1 relationship; one azure resource maps to one identity in azure AD.1:N relationship; one identity can be shared across multiple azure resources.
ConfigurationConfigured via the Managed Identity blade in the azure portal.Created and managed independently of the resources that use it.
Use CaseIdeal for scenarios where the identity is tightly coupled with the resource lifecycle.Suitable for scenarios requiring shared identities across multiple resources.

Tip: Choose system-assigned managed identities for single-resource scenarios where you want the identity to disappear with the resource. Pick user-assigned identities when you need to share the same identity across multiple resources or want to manage the identity lifecycle separately.

By using managed identities in azure, you strengthen your security posture. You avoid hardcoding secrets and reduce the risk of credential exposure. This approach helps you protect your data and maintain strong data security across your cloud environment.

Advantages of Managed Identities

Credential-Free Access

Managed identities provide you with credential-free access to Azure resources. This feature eliminates the need to store sensitive information like passwords or API keys in your application code. By using managed identities, you enhance your security posture significantly. Here are some operational benefits of eliminating credentials from your application code:

BenefitDescription
Enhanced SecurityEliminates credential theft vulnerabilities; tokens automatically expire, reducing misuse risk.
Reduced Operational OverheadNo need for credential rotation schedules or emergency procedures; the platform manages lifecycle.
Improved Developer ProductivitySimplifies authentication, allowing developers to focus on business logic rather than credential management.
Clearer Audit TrailsDetailed logging of authentication events, including context of access requests.
Easier Compliance ManagementFine-grained permissions and comprehensive logging assist in meeting compliance requirements.

With these benefits, you can see how managed identities streamline your operations while keeping your data secure.

Policy-Driven Access

Policy-driven access control in Azure enhances your security and compliance. This approach allows you to define and enforce access policies systematically. Here are some key aspects of policy-driven access control:

  • It implements the principle of least privilege, which is essential for regulatory compliance.
  • Azure Policy aligns with compliance standards like HIPAA and ISO 27001, providing automated auditing and enforcement.
  • Automation minimizes human error and ensures consistent application of security policies.
  • Conditional access and multi-factor authentication further enhance security and compliance.

Azure’s compliance framework not only meets regulatory requirements but also serves as a governance tool. It enables you to implement strong policies that align with best practices. By using policy-driven access, you can manage who accesses your resources and under what conditions, ensuring that your data remains secure.

Azure Key Vault for Secrets

Managing Secrets

Azure Key Vault plays a crucial role in managing secrets and sensitive information for your cloud applications. This cloud service safeguards cryptographic keys, secrets, and certificates. It provides secure storage for sensitive information like encryption keys, passwords, and connection strings. With Azure Key Vault, only authorized users and applications can access the stored secrets. Here are some key features of Azure Key Vault for managing secrets:

  • Centralized Management: You can manage sensitive information like passwords and API keys in one secure location.
  • Key Lifecycle Management: Azure Key Vault allows you to create, rotate, and expire keys to mitigate risks. You can set up automatic key rotation policies to enhance security.
  • Integration with Azure Active Directory: This integration ensures that only users with the right permissions can access your secrets.

To maintain a secure environment, follow these best practices for storing and rotating secrets:

  1. Use tags for metadata to store management information such as rotation schedules and expiration dates.
  2. Keep secret values concise; large secrets should be stored encrypted in Azure Storage.
  3. Rotate secrets regularly, at least every 60 days.
  4. Automate secret rotation using Azure Key Vault's built-in capabilities.
  5. Enable Key Vault logging to monitor all secret access.

Security Features

Azure Key Vault offers robust security features to protect your secrets from unauthorized access. Here’s a look at some of these features:

Security FeatureDescription
Access Control MechanismsUtilizes managed identities and granular RBAC permissions to restrict access to secrets.
Secure StorageEnsures encryption of secrets both at rest and in transit.
Monitoring with Logging and AlertingMonitors access and activities with logging and alerting capabilities.
Soft Delete and Purge ProtectionPrevents accidental or malicious deletion of secrets.
Threat DetectionDetects threats via Microsoft Defender for Key Vault.

These features enhance your data security by ensuring that only authorized personnel can access sensitive information. Azure Key Vault also integrates with other Azure security services, providing improved security through centralized secret distribution and monitoring. By using Azure Key Vault, you can maintain compliance with Azure compliance standards while protecting your data effectively.

Implementing Azure Security

Transition Steps

Transitioning to passwordless authentication in Azure requires careful planning and execution. Follow these steps to ensure a smooth transition:

  1. Register hardware keys: Start by registering FIDO2 Security Keys for your users. This step lays the foundation for passwordless access.
  2. Monitor enrollment progress: Use the Azure AD portal to track user enrollment status. This monitoring helps you identify who has successfully transitioned.
  3. Communicate and train users: Provide detailed setup instructions and support. Update your IT policies to reflect the new passwordless approach.
  4. Manage passwordless authentication: Regularly review sign-in logs and adjust policies as needed. Auditing security reports will help you maintain oversight.
  5. Follow best practices: Communicate early about the transition, start with a pilot group, promote user adoption, and stay updated with Microsoft Entra enhancements.

By following these steps, you can effectively implement passwordless solutions and enhance your organization's security posture.

Best Practices

After adopting passwordless authentication, maintaining security in your Azure environment is crucial. Here are some best practices to consider:

  1. Enable Multifactor Authentication (MFA): Adding MFA provides an extra layer of security. It requires users to verify their identity through multiple methods, reducing the risk of unauthorized access.
  2. Use Conditional Access Policies: Implement access controls based on specific conditions, such as user roles and device health. This approach ensures that only authorized users can access sensitive data.
  3. Regularly Monitor and Audit Logs: Continuous monitoring helps you identify suspicious activities. Regular audits of logs can reveal potential threats and allow for timely responses.

Additionally, organizations may face challenges during the implementation of passwordless solutions. Here are some common challenges:

ChallengeDescription
User CreationCreating Azure AD users without passwords directly can be complex, requiring workarounds.
Hardware Key DistributionDistributing hardware keys like YubiKeys can be logistically challenging for large enterprises.
Onboarding SecurityOnboarding users without relying on Temporary Access Passes (TAPs) poses security challenges.
Device PreparationPreparing devices for passwordless authentication adds complexity to the implementation process.
User Lifecycle ManagementManaging user lifecycle processes in a passwordless environment introduces operational challenges.

By addressing these challenges and following best practices, you can enhance your Azure security and ensure a successful transition to passwordless authentication.


Adopting Azure's passwordless authentication methods significantly enhances your security and reduces risks. Here are some key takeaways:

  • Passwordless solutions improve accessibility for users who struggle with remembering passwords.
  • They help organizations comply with regulatory standards while enhancing overall security.
  • Tailored authentication methods can balance usability and security for different user groups.

By implementing Azure's passwordless solutions, you eliminate the need for managing passwords and secrets. This approach minimizes potential breaches and simplifies the authentication process. Ultimately, transitioning to a passwordless environment strengthens your security posture and protects your sensitive data.

FAQ

What is passwordless authentication?

Passwordless authentication allows you to access systems without using traditional passwords. Instead, it uses methods like biometrics, security keys, or mobile authenticators to verify your identity securely.

How does Azure enhance security with passwordless solutions?

Azure provides various passwordless options, such as FIDO2 security keys and integration with Microsoft Entra. These solutions reduce vulnerabilities and streamline user access, enhancing overall security.

What are managed identities in Azure?

Managed identities are special identities created by Azure. They allow your applications to authenticate to other Azure services without storing credentials, improving security and simplifying secret management.

What are the benefits of using Azure Key Vault?

Azure Key Vault securely manages sensitive information like passwords and API keys. It offers centralized management, key lifecycle management, and robust access control, ensuring only authorized users can access secrets.

How can I transition to passwordless authentication in Azure?

To transition, register hardware keys, monitor user enrollment, communicate changes, and manage authentication policies. Following best practices will help ensure a smooth implementation.

What challenges might I face when implementing passwordless solutions?

Common challenges include user creation without passwords, distributing hardware keys, onboarding security, and managing user lifecycles. Addressing these issues early will help streamline your transition.

How does policy-driven access control work in Azure?

Policy-driven access control allows you to define and enforce access policies systematically. This approach ensures that only authorized users can access resources, enhancing security and compliance.

Why should I consider moving away from passwords?

Moving away from passwords reduces the risk of breaches caused by weak or stolen credentials. Passwordless solutions enhance security, improve user experience, and simplify authentication processes.

🚀 Want to be part of m365.fm?

Then stop just listening… and start showing up.

👉 Connect with me on LinkedIn and let’s make something happen:

  • 🎙️ Be a podcast guest and share your story
  • 🎧 Host your own episode (yes, seriously)
  • 💡 Pitch topics the community actually wants to hear
  • 🌍 Build your personal brand in the Microsoft 365 space

This isn’t just a podcast — it’s a platform for people who take action.

🔥 Most people wait. The best ones don’t.

👉 Connect with me on LinkedIn and send me a message:
"I want in"

Let’s build something awesome 👊

Here’s a fun fact: embedding credentials in your Azure apps is basically handing out house keys at a bus stop. Entra ID and managed identities let you lock every door without juggling keyrings or hoping nobody notices the Post-It note under your keyboard. The good news—you don’t need to be a cryptography wizard to do this. I’ll show you step by step how to swap secrets for tokens and sleep better at night. The Doormat Key Problem Why do so many Azure apps still stash passwords in config files like we’re all still writing VBScript in 2003? Seriously, it’s 2024. We have cloud-native security systems that mint tokens on demand, yet someone somewhere is still committing a literal sa password to their repo like it’s a badge of honor. And the excuse is always the same: “We hard‑code it just to save time.” Save time today, and then spend weeks cleaning up the mess when it leaks. That's not a shortcut. That’s procrastination with extra steps. The problem is bigger than laziness. Developers think dropping usernames and passwords into a web.config file or appsettings.json is harmless because it stays internal. Except nothing ever stays internal. That config gets copied to dev, test, staging, three different QA branches, backups, and a laptop someone left on a plane. That’s not a secret; that’s a distributed broadcast. Add in Git, where “oops, wrong push” has put more production passwords public than I care to count, and you’ve got an incident queue that writes itself. Here’s the part nobody likes to admit: these “quick fixes” don’t just risk exposure—they guarantee it over time. Secrets are slippery. They creep into log files because you forgot to sanitize an exception. They hide in screenshots shared over Teams. They get zipped into backups sitting unencrypted in blob storage because no one paid for the vault tier. All it takes is one bored attacker scanning public repos for obvious strings—Password123! is still a goldmine—and suddenly your entire app is wide open. One of my favorites? Remember when thousands of credentials showed up in public GitHub a few years back because devs used personal repos for “just testing”? Attackers didn’t even have to try. They ran keyword scans, found connection strings, and walked straight into production resources. No zero‑day. No Hollywood hacking montage. Just copy, paste, profit. That’s what hard‑coding secrets buys you—a house where the burglar doesn’t even need to pick a lock. The key’s under the mat, and you spray‑painted “KEY IS UNDER REACT APP SETTINGS” on the front porch. You wouldn’t leave your front door unlocked with the garage code written on a sticky note, but that’s exactly how connection strings behave when they include credentials. Sure, it works. Until a neighbor—by which I mean some anonymous botnet—figures out where you hid them. Microsoft has been very clear these days: hard‑coded credentials are being pushed into the same bucket as Internet Explorer and Clippy. Deprecated. You can limp along with them, but expect disappointment, breakage, and an audit log screaming at you. Add to that the sprawl problem. Each environment needs its own settings, so now you’ve got a password per dev box, an admin string in staging, another one production, and nobody knows if they’re rotated. Different teams hoard slightly out‑of‑date copies. Someone comments out an old connection string instead of deleting it. Congratulations: your app is a digital junk drawer of skeleton keys. Attackers love it because it’s a buffet. And let’s not even mention what happens when contractors get read‑access to your repos. You think they only take the code? The takeaway here is simple: the real danger isn’t just a password leaking. It’s the way secrets breed. Once you let them into configs, they replicate across environments, backups, scripts, and documentation. You cannot manage that sprawl. You cannot contain it with “clever” obfuscation tricks. It’s not a problem you patch; it’s a problem you eliminate. Stop thinking about where to hide the key. Instead, stop using keys at all. That’s why tokens exist. They don’t behave like passwords. They aren’t long‑lived, they aren’t static, and they don’t sit in files for years daring the wrong person to find them. The cure for password sprawl isn’t to hide the passwords better—it’s to replace them with something that self‑destructs when it’s misused. Tokens let you do exactly that, and Entra ID is the system handing them out. Okay, so if we throw the doormat keys away, how do tokens avoid turning into even messier problems for us admins? Let’s talk about why they actually make life easier instead of harder. Why Tokens Beat Passwords Every Time If passwords are car keys, tokens are valet tickets—you use them for a single ride, and they’re worthless once the trip’s done. Nobody makes a sneaky copy of a valet ticket, and if they try, someone spots it right away. That’s the fundamental difference: passwords are static. Tokens are temporary and scoped. Which means if they leak, the blast radius is tiny, and the clock is already ticking before they expire. So what even is a token? In Azure land, your app hits Entra ID and says, “Hey, can I get permission to do this thing?” Entra ID checks who or what’s asking, does its paperwork, and then hands back a signed package: the access token. That token is short‑lived. It’s tied to the user or service identity. It’s got limits on what it can touch. And when the time window closes, it’s dead. Nobody resets it, nobody rotates it—it just vanishes. Of course, when you tell devs this, the first instinct is panic. “Oh no, now we’ve got rotating tokens flying around, do we have to cache them, store them, chase refresh codes, build replacement logic?” The answer: no, stop sweating. The Microsoft Identity libraries do that plumbing for you. The SDKs literally grab, refresh, and dispose like janitors cleaning up after a conference. You don’t have to reinvent OAuth. You just call the function and focus on your actual app logic. Compare it with the old school way. A static password is like handing someone the master key to your entire building. They don’t just get into their floor; they can hit the executive suite, the server room, even the candy stash in HR’s drawer. Now take a token: it’s a guest pass that only works for Floor 3, and it shuts off at 5 p.m. If someone tries to use it after hours, access denied. No guessing, no lingering. It’s scope matched to function, not wide open duct tape. Tokens also carry brains inside them. Ever open up a token? It’s like inspecting a boarding pass—there’s your flight, seat row, gate, and zone. Tokens store claims: roles, scopes, tenant IDs, even the user’s basic info. That means your API isn’t just trusting “this person logged in.” It’s checking “this person is in finance, has the payments role, and was approved today.” You can build way tighter rules directly into your app logic, without managing ten different password sets. Here’s a real comparison. One shop I worked with had a database locked only with SQL credentials hard‑coded everywhere. That account had system admin. Predictably, one contractor copied it to a tool, and bam—the entire database was their playground. Every table exposed. Now look at a newer system using tokens scoped only to what the app needed: read access on a single schema. Even if someone stole that token, all they could do was select records, and only until the token expired. It turned a nightmare into a minor annoyance. Now I can hear some devs groaning: “Tokens sound neat in theory, but they’ll break my workflow. I don’t have time to micromanage renewal or expiration.” That’s the myth. Nobody’s expecting you to refresh them manually. The libraries you’re already using in .NET or Node grab the refresh token, swap it invisibly, and keep rolling. You don’t even know it happened unless you were sniffing packets. Which is the point—stop babysitting secrets; let the system handle it. Think of Entra ID as the passport office. You show up, prove who you are, and they stamp an ID that border guards (your APIs) trust. Expired stamp? No boarding. Wrong stamp? Denied. It centralizes the identity question in one authority. Your apps don’t argue, your APIs don’t babysit passwords—they just check the stamp and let you through. That’s infinitely better than juggling a dozen mystery keys and wondering which ones are still valid. The best part for us IT folks: no more forced password rotations every 90 days, no more scripts running at 3 a.m. to reset service accounts, no more debates about whether to store secrets in Key Vault or under a heavy dose of wishful thinking. Tokens expire on their own, and that expiration is your safety net. If something leaks, it’s already doomed to stop working. You didn’t fix anything—you just built a system that auto‑heals by design. So yes, tokens handle user logins securely and cleanly. Great. But it’s not just about users clicking sign‑in. The real test is when apps need to talk to other apps, or services fire off requests at three in the morning without a human anywhere near a keyboard. That’s where things shift from neat to necessary. Meet Managed Identities: Service Principals, but Less Dumb Imagine if your app could march into Azure services without ever typing a password, because it already came out of the factory with its own stamped identity. That’s not science fiction—it’s how Managed Identities work. And once you start using them, the whole idea of shuffling service principals around with expiring secrets will feel as dated as carrying a pager. Here’s the old mess we used to live with: service principals. You’d register one, generate a client secret or maybe a certificate, and stuff that into Key Vault. Then you hand that identity to your app so it could do things like connect to SQL or hit Storage. On paper, it sounded fine—credentials weren’t hard‑coded anymore, they were centralized. In reality, you were babysitting hot potatoes that expired every one to two years. You’d set an Outlook reminder called “don’t let prod die,” then still forget until the Sunday outage alert hit. And if you ever logged secrets to the wrong console, congratulations—you spray painted your vault on a billboard. Sure, vaults were better than config strings. But you were still juggling. You had to rotate secrets by hand or automate it with scripts. If the rotation failed, your app died in silence. And let’s not pretend most shops ever tested rotations in staging—they just waited for the day prod refused to start. How many of us have been woken up by that “can’t connect to database” ticket, only to discover the mystery string expired at midnight? Too many. That’s where Managed Identities flip the table. You spin up a resource—say, an Azure App Service, a Function, or a VM—and you flip a switch: “Assign Managed Identity: On.” Done. Behind the curtain, Azure creates an identity object in Entra ID that your resource can use. No secret strings. No vault renewal dates. It’s the app version of being born with a driver’s license. You don’t carry a laminated key card. The cloud already knows who you are, and it vouches for you any time you need to talk to another resource. Think about it like this: every app used to be a teenager borrowing dad’s car. They had to carry around the keys, and if they lost them, game over. With Managed Identity, the app walked into the DMV the second it was created, got its own license and insurance, and now it doesn’t need to ask permission at midnight. No spare keys taped under the bumper. Technically, here’s what’s happening. Your app calls the Instance Metadata Service, that weird link that only exists inside Azure VMs and services. It says, “Hey, I need a token to talk to SQL.” The metadata service goes, “Okay, I know your identity because you’re running inside an approved resource. Here’s a signed, short‑lived token straight from Entra ID.” Boom—no handling credentials, no rotating, no vault. You just get a JWT you can send to SQL or Storage, and the target validates it against Entra ID. Example time. You’ve got a web app that needs to query a SQL Database. Old setup: you hide a SQL username and password in Key Vault, and the app pulls it at runtime. You spend half your life worrying if it was rotated correctly, if the Key Vault references work in staging, and if the devs pushed the right policy. New setup: turn on Managed Identity for the web app, add it as a database user in SQL with the needed role, and you’re done. The app asks Azure for a token, uses it in the connection string, and never once sees a password. There’s nothing to rotate, and nothing to leak in logs. The benefits pile up fast. Secrets completely vanish from repos and configs, so the odds of devs accidentally uploading sensitive strings go from near‑certainty to practically zero. Rotation becomes automatic—tokens age out on their own, there’s no midnight panic renewals. And because identities are Entra ID objects, you grant them least privilege. Your web app doesn’t need contributor to your entire subscription; it only needs read access to one storage container. You make that assignment once, and Azure enforces it. Bottom line—Managed Identities turn service communication from “hope you didn’t leak the keys” into “it just works.” They give you secure defaults without the cleanup duty. It’s the closest thing to magic we get in Azure security. Of course, an ID is only useful if the directory actually knows about it and what it can do. And that’s where app registrations come into play—because paperwork still matters, even for cloud identities. App Registrations Without Losing Your Sanity App registrations are the DMV of Entra ID—nobody wakes up excited to deal with them, but without the paperwork, you’re not driving anywhere. They’re boring, they’re picky, and you absolutely have to do them. This is the blueprint step: it’s what tells Entra ID how your application identifies itself, which APIs it can talk to, and how it will ask for permission. If you skip it or slap it together wrong, you’ll build an application that might technically run but ignores every security rule along the way. And much like skipping the DMV, eventually somebody pulls you over. At its core, an app registration is just an identity card for an application. It defines how the app can sign in—whether it’s users logging in with accounts or the app itself acting as a service identity. It also holds the permissions and endpoints involved. That means scopes, roles, redirect URIs, and just enough red tape to make you roll your eyes. But this red tape is the reason the whole thing works. Without it, Azure doesn’t know who to trust and APIs don’t know when to slam the door. Here’s the fun part: it’s not complicated until you get it wrong. Mess up a redirect URI? Suddenly your app is open like a carnival ride with no seatbelts. Mix up scopes with roles? You’ve just granted privileges about twelve levels higher than you intended. That’s how a web portal meant to read profile info ends up writing to calendars, wiping contacts, and scaring compliance officers. And Microsoft Graph is the classic landmine here. How many apps have been spotted with full Graph read‑write secured by nothing more than one lazy registration? Way too many. They didn’t need everything—they needed profile.read. But because someone didn’t stop to check, they granted the developer version of god mode. So let’s cut through the jargon. Scopes are what an app can do **on behalf of a user**. Roles are what the app itself is allowed to perform. Think of it like a school. Scopes are the hall passes: “Emily can leave class to go to the library.” Roles are the job titles: “Emily is a librarian, so she’s allowed behind the circulation desk.” If you mix those up, you’ve given every student a staff badge. Nobody wants a hallway full of teenagers with server room access, but that’s what lazy app registrations create. And then there’s the consent flow. Users and admins get asked to approve what the application is requesting at sign‑in time. This is where most people’s eyes glaze over. But here’s the truth: those consent prompts are your audit trail. They tell you what the app is asking for and who approved it. If you skip them or train users to blindly hit “Accept,” you’re basically running an honor system at the vault door. Which means you don’t have a vault anymore—you have an invitation to chaos. There’s a simple move that saves headaches: combining Easy Auth with real claims checks inside your APIs. Easy Auth lets you wire up authentication with almost no code—flip the switch, and your front door works. But don’t stop there. Build claims checks so your APIs look at the token, inspect the scopes or roles embedded, and then enforce rules. That way even if someone forwards a token around, the API itself makes sure only the right halls are open. One shop I worked with used Easy Auth on an internal portal but skipped the claims checks. It worked fine until someone copied a user’s token and called the APIs directly. Nothing in their setup validated whether the caller was supposed to hit those endpoints. By the time they caught it, half their tenant data had been poked at. Dropping a simple role check would have shut that down instantly. Security isn’t always about more tools—it’s about using the ones you already have properly. When you configure app registrations the right way, something magical happens: random API clients stop sneaking through. Because the rules are tight, the tokens don’t lie, and consent is properly logged. Your apps only talk to what they’re allowed to. Your users only grant what’s absolutely needed. And your repo stops being a dumping ground for accidental privileges. So now you’ve got users logging in correctly, services with real IDs, and APIs that aren’t left wide open. The next question is what happens when an app doesn’t just act for itself—it needs to impersonate a user or pass their access down the chain. That’s where the real fun begins. Subscribe to the newsletter at m365 dot show or follow us on the M365.Show page for livestreams with MVPs who’ve been through this exact grind and learned the hard lessons, so you don’t have to. Forwarding Tokens Without Breaking the Chain Ever tried passing a note in class, only for it to get rewritten three or four times before it finally reaches the teacher? Half the message is lost, someone doodles in the margins, and by the end it barely makes sense. That’s exactly what forwarding user tokens feels like when you set it up wrong. You think the user’s identity is making its way down the line, but by the time it hits the last service it’s unrecognizable, or worse, rejected completely. Here’s the scenario we’re really dealing with: you’ve got a user logging in through a front‑end app. That front‑end app doesn’t do all the heavy lifting itself—it calls another back‑end API to do the actual work. Sounds fine, but the catch is you still need that original user’s identity to travel with the request. If it doesn’t, the back‑end API is just guessing about who the request belongs to. So delegation has to be chained. Front‑end proves who the user is, passes that context down, and the back‑end keeps that thread intact. Simple in theory. In reality? It’s a minefield. Because here’s where things blow up. If you just forward the original access token directly, you run into the “double hop” problem. The token was issued for App A to call Resource X, but then App A tries to use the same token to call App B. App B sees the mismatch and says, “Nope, token not valid for me.” And suddenly your neat user experience unravels into extra prompts, broken claims, or worse, another consent popup for the same user who already signed in. Nothing kills trust faster than a line of users thinking, “Didn’t I already allow this yesterday?” The right way to fix this isn’t duct tape. You need to use OAuth 2.0’s On‑Behalf‑Of flow, or OBO if you enjoy shorter acronyms. The idea is straightforward: each service doesn’t just forward the original token. It takes that incoming token, proves it to Entra ID, and then trades it in for a new, fresh token that’s valid for the next API in line. It’s like the user hands the first service a hall pass, and instead of trying to sneak it through every door, that service swaps it out at the office for a proper pass to the next hallway. Each hop gets a token scoped to its role, and security stays intact. Now, if you’ve built this by hand, you know it can feel like juggling knives. Parsing tokens, handling refreshes, swapping them at the right point. Luckily, middleware like Easy Auth makes this tolerable. Easy Auth does the dull bits—storing the token, refreshing it, and offering a helper call to grab it on demand. Instead of rolling weird hacks that shove tokens through headers and praying nothing leaks into logs, you let middleware take the night shift. You avoid your dev team “helpfully” building a custom solution that logs the token plain‑text for debugging, and then forgets to strip it. That’s a risk you can’t ignore. Passing raw tokens blindly is like copying your driver’s license and handing it around at every door. Too much personal info ends up where it doesn’t belong, and suddenly anyone who intercepts the request has way more than they should. Not only does that risk leaks of actual identity data, it also flattens security boundaries. APIs stop being able to draw clear lines between who a user is and what the service should be trusted with. The result? You either over‑grant permissions or block legitimate calls. Both are nightmares: one leaks data, the other drowns your helpdesk in complaints. Let’s run through a clean example. A user signs into a front‑end web app. That app calls a protected API, but instead of forwarding the raw access token, it uses OBO to get a new token valid just for that API. Now the API wants some data from SQL. Perfect—that’s not a user’s direct concern, so the API doesn’t forward anything. It grabs a system token through a Managed Identity, connects to SQL, runs its queries, and sends just the needed results back. At every stage the identity context is clear: user for the app and API, system identity for the database. Each token is scoped, short‑lived, and verifiable. The payoff here is huge: services chain together without confusing the identity signal. Users don’t get spammed with extra consent prompts, your APIs enforce the right claims without confusion, and you avoid putting raw keys on the wire where they don’t belong. OBO is less about extra work and more about keeping the chain of trust unbroken from front‑end to back‑end, all the way down to the database. By now, you’re probably noticing a pattern: users, services, APIs, all tightened up under Entra ID. Each part is secured the right way, without the mess of passwords or sprawling secrets. So the real question is—what’s the practical gain for us after doing all this heavy lifting? Subscribe to the newsletter at m365 dot show or follow the M365.Show page for livestreams with MVPs who know these scars firsthand and can walk you through the safer patterns before you live through the outages. Conclusion Hard‑coded secrets aren’t a clever shortcut; they’re legacy baggage. They spread across configs, repos, and backups until you’re basically running a scavenger hunt for hackers. Entra ID and managed identities slice that risk out completely—your apps get trusted, short‑lived tokens without you juggling passwords like it’s 1999. Even Microsoft flatly says secrets in the cloud are deprecated, so stop propping them up. While you’re at it, remember MFA blocks over 99.2% of compromise attempts, so layer that on top. Subscribe at m365 dot show—because the next rename will land before your Azure Portal learns how to load faster. This is a public episode. If you'd like to discuss this with other subscribers or get access to bonus episodes, visit m365.show/subscribe

Mirko Peters Profile Photo

Founder of m365.fm, m365.show and m365con.net

Mirko Peters is a Microsoft 365 expert, content creator, and founder of m365.fm, a platform dedicated to sharing practical insights on modern workplace technologies. His work focuses on Microsoft 365 governance, security, collaboration, and real-world implementation strategies.

Through his podcast and written content, Mirko provides hands-on guidance for IT professionals, architects, and business leaders navigating the complexities of Microsoft 365. He is known for translating complex topics into clear, actionable advice, often highlighting common mistakes and overlooked risks in real-world environments.

With a strong emphasis on community contribution and knowledge sharing, Mirko is actively building a platform that connects experts, shares experiences, and helps organizations get the most out of their Microsoft 365 investments.