Skip to content
Access control Write-up Advanced

UnOAuthorized: Privilege Elevation Through Microsoft Applications

Microsoft Entra ID allowed credentials to be assigned to service principals of certain Microsoft applications, and those credentials could be used to obtain tokens that performed privileged actions not listed in the application's OAuth scopes. An attacker with the Application Administrator or Cloud Application Administrator role could add a user to the Global Administrator role via the Device Registration Service.

Eric Woodruff Follow

Published on semperis.com

This article details a series of Semperis security research team discoveries that resulted in the ability to perform actions in Entra ID beyond expected authorization controls, based on analysis of the OAuth 2.0 scope (permissions). Our most concerning discovery involved the ability to add and remove users from…

Eric Woodruff | Chief Identity Architect, on semperis.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely Microsoft applications relied on internal authorization mechanisms beyond the OAuth 2.0 scopes visible to customers, so actions were permitted that the scopes did not reflect.

Impact

An attacker with the Application Administrator or Cloud Application Administrator role could elevate privileges to Global Administrator and establish persistence, though Microsoft has since restricted the ability to authenticate as these applications.

What the attacker needed

Application Administrator or Cloud Application…; ability to assign a credential to a service principal

The fix

Microsoft restricted the ability to use credentials on Microsoft application service principals, and authentication as Device Registration Service now fails.

How it was found

  1. Assign a credential to the service principal of a Microsoft application such as Device Registration Service.
  2. Use that credential in an OAuth 2.0 client credential grant flow to authenticate as the application.
  3. Observe that the token has empty scopes but still allows privileged actions through Microsoft Graph.
  4. Perform a privileged action, such as adding a user to the Global Administrator role.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

In Microsoft's cloud identity system, applications can be given passwords or certificates so they can log in and act on their own. The researchers found that some Microsoft-owned applications accepted these credentials and could then do things, like change who is an administrator, even though the application's listed permissions said it should not be allowed. This meant someone who already had a fairly powerful admin role could quietly become the most powerful administrator.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Microsoft (Entra ID / Azure AD)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.