Microsoft Azure AD OAuth Misconfiguration Exposes “Log in with Microsoft” to Account Takeover Exploits

Microsoft Azure AD is a widely-used cloud platform that provides numerous features, including OAuth authentication protocol. It allows users to use their Microsoft credentials to log in to third-party applications. However, researchers at Descope, a startup company, have identified a major misconfiguration in Microsoft Azure AD OAuth applications that poses a significant security risk to businesses that use “Log in with Microsoft” functionality. In this article, we will describe the security defect, how hackers can exploit it, and the necessary actions to prevent unauthorized access to applications that use Azure AD OAuth.

Description of the Security Defect

The misconfiguration in Microsoft Azure AD is an authentication implementation flaw that can affect multi-tenant OAuth applications. The security defect has been nicknamed nOAuth by Descope. The flaw can enable a malicious actor to take over accounts within businesses that use “Log in with Microsoft.” The flaw arises from the use of the email claim in access tokens for authorization purposes.

Exploitation of the Flaw

A malicious actor can modify email attributes in Microsoft Azure AD accounts and exploit the “Log in with Microsoft” feature using the email address of any victim they want to impersonate. This could result in a full account takeover of the victim’s account, allowing the attacker to access sensitive information and perform unauthorized actions on behalf of the victim.

There seems to be an issue with the “Email” Claim in Microsoft Azure AD. Typically, the user’s email address is used as the unique identifier by applications in OAuth and OpenID Connect implementations. However, in Microsoft Azure AD, the “email” claim returned in the access token is mutable and unverified, which means it cannot be trusted. This makes it easier to carry out malicious attacks such as escalation of privileges and account takeovers.

The Combined Effect

When the authentication implementation flaw is combined with the unreliable email claim, an attacker with access to a vulnerable app and a specially crafted “victim” user can exploit the “Log in with Microsoft” feature, resulting in a complete account takeover. This could have serious consequences for businesses that use Microsoft Azure AD for their authentication needs.

Descope reported the issue to Microsoft earlier this year and worked with them to develop new mitigations to protect businesses from privilege escalation attacks. Companies that use the “Log in with Microsoft” functionality are urged to take urgent action to update their systems and ensure they are protected.

Microsoft has acknowledged the issue and described it as an insecure anti-pattern used in Azure AD (AAD) applications. The company recommends that developers never use the email claim for authorization purposes. If an application uses the email claim for authorization or primary user identification, it could be subject to account and privilege escalation attacks. Microsoft is urging developers to review the authorization business logic of their applications and follow documented guidance to protect them from unauthorized access.

Developer Guidance from Microsoft

Developers who use Microsoft Azure AD OAuth should take urgent action to protect their applications. Microsoft is urging developers to review the authorization business logic of their applications and follow documented guidance to protect applications from unauthorized access. This guidance includes best practices on how to use authentication and authorization, how to identify and mitigate vulnerabilities, and how to ensure ongoing security.

The discovery of this security flaw highlights the ongoing need for companies to thoroughly evaluate their security practices and implement measures to identify and address vulnerabilities before they are exploited. Businesses that use Microsoft Azure AD OAuth should take urgent action to protect their applications and users from the threat of account takeover. By following Microsoft’s guidance, companies can ensure that their applications are secure, and their users’ data is protected from unauthorized access and malicious attacks.

Explore more

How B2B Teams Use Video to Win Deals on Day One

The conventional wisdom that separates B2B video into either high-level brand awareness campaigns or granular product demonstrations is not just outdated, it is actively undermining sales pipelines. This limited perspective often forces marketing teams to choose between creating content that gets views but generates no qualified leads, or producing dry demos that capture interest but fail to build a memorable

Data Engineering Is the Unseen Force Powering AI

While generative AI applications capture the public imagination with their seemingly magical abilities, the silent, intricate work of data engineering remains the true catalyst behind this technological revolution, forming the invisible architecture upon which all intelligent systems are built. As organizations race to deploy AI at scale, the spotlight is shifting from the glamour of model creation to the foundational

Is Responsible AI an Engineering Challenge?

A multinational bank launches a new automated loan approval system, backed by a corporate AI ethics charter celebrated for its commitment to fairness and transparency, only to find itself months later facing regulatory scrutiny for discriminatory outcomes. The bank’s leadership is perplexed; the principles were sound, the intentions noble, and the governance committee active. This scenario, playing out in boardrooms

Trend Analysis: Declarative Data Pipelines

The relentless expansion of data has pushed traditional data engineering practices to a breaking point, forcing a fundamental reevaluation of how data workflows are designed, built, and maintained. The data engineering landscape is undergoing a seismic shift, moving away from the complex, manual coding of data workflows toward intelligent, outcome-oriented automation. This article analyzes the rise of declarative data pipelines,

Trend Analysis: Agentic E-Commerce

The familiar act of adding items to a digital shopping cart is quietly being rendered obsolete by a sophisticated new class of autonomous AI that promises to redefine the very nature of online transactions. From passive browsing to proactive purchasing, a new paradigm is emerging. This analysis explores Agentic E-Commerce, where AI agents act on our behalf, promising a future