How the attack works
A redirect URI, or reply URL, is the address to which Microsoft Entra ID sends a user after a successful sign-in to an application, together with the authorization code or token for that application. Microsoft Entra ID only sends users to addresses that are registered on the application. Whoever can add an address to that list decides where the result of a sign-in can go. Application owners, the application administrator roles and applications that may write to app registrations can all change it.
An attacker with one of these rights adds an address on a server they control and then sends users a sign-in link for the real application that names the new address. The user sees the genuine Microsoft sign-in page and the name of an application they know, signs in, and the code or token arrives at the attacker's server. The same result needs no change at all when an old redirect URI points to a domain that has lapsed or to a cloud host name that was given up: the attacker registers that name and owns a redirect URI that is already trusted. Microsoft's security operations guide calls this a dangling URI and rates both cases as high risk.
The change is written to the audit log as Update application in the ApplicationManagement category, and Microsoft names the modified property that carries the addresses, AppAddress. The rule on this page reads that event. Microsoft tells defenders to look for URIs that do not use HTTPS, URIs with wildcards at the end or in the domain, URIs that are not unique to the application and URIs that point to a domain the organization does not control. Those checks need the new value and your own list of domains, so they are described under detection logic.
What an attacker needs
- The right to change the application: ownership of the app registration, an application administrator role, or an application that can write to app registrations.
- For the dangling case, no access to the tenant at all, only a registered redirect URI whose domain or host name can be claimed.
- A user who follows a sign-in link for the application.
Impact
Authorization codes or tokens for the users who sign in through the attacker's address, with the permissions the application already holds for them. No consent prompt appears, because the application is one the user or the tenant has already approved. The access lasts as long as the tokens and continues with each new sign-in until the address is removed.
Detection rules
Redirect URI Changed on an Application
Detects a successful update of an application in which the redirect URIs changed. Microsoft's security operations guide for applications gives the event for both dangling URIs and redirect URI configuration changes: service Core Directory, category ApplicationManagement, activity Update application, success, property name AppAddress. The rule matches that property name in TargetResources. Whoever adds a redirect URI decides where Microsoft Entra ID may send the authorization codes and tokens of the application's users. Microsoft documents the property name and not the layout of its value, so the rule cannot judge the address. It fires on every change, including the removal of an address, and is a building block: read the old and the new value and look for addresses without HTTPS, with wildcards or on a domain you do not control.
title: Redirect URI Changed on an Application
id: edbb4e95-3a6f-4fdf-9e04-5bc8ded3ee54
status: experimental
description: >-
Detects a successful update of an application in which the redirect URIs
changed. Microsoft's security operations guide for applications gives the
event for both dangling URIs and redirect URI configuration changes: service
Core Directory, category ApplicationManagement, activity Update application,
success, property name AppAddress. The rule matches that property name in
TargetResources. Whoever adds a redirect URI decides where Microsoft Entra
ID may send the authorization codes and tokens of the application's users.
Microsoft documents the property name and not the layout of its value, so
the rule cannot judge the address. It fires on every change, including the
removal of an address, and is a building block: read the old and the new
value and look for addresses without HTTPS, with wildcards or on a domain
you do not control.
references:
- https://learn.microsoft.com/en-us/entra/architecture/security-operations-applications
- https://learn.microsoft.com/en-us/entra/identity-platform/reply-url
- https://learn.microsoft.com/en-us/entra/identity/monitoring-health/reference-audit-activities
- https://attack.mitre.org/techniques/T1528/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1528
logsource:
product: azure
service: auditlogs
detection:
selection:
OperationName: Update application
TargetResources|contains: AppAddress
filter_failed:
Result: failure
condition: selection and not filter_failed
falsepositives:
- Developers who add or remove the addresses of a new environment, a new host name or a local test setup. This is ordinary maintenance, so scope the alert to applications with sensitive permissions or many users, and to actors who do not normally maintain the application.
- Deployment pipelines that update the app registration on each release. Exclude their identities once they are known.
level: medium
False positives
- Developers who add or remove the addresses of a new environment, a new host name or a local test setup. This is ordinary maintenance, so scope the alert to applications with sensitive permissions or many users, and to actors who do not normally maintain the application.
- Deployment pipelines that update the app registration on each release. Exclude their identities once they are known.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
New redirect URI on a domain the organization does not control
The single-event rule fires on every redirect URI change. The change that matters adds an address outside the organization's own domains, without HTTPS or with a wildcard. Comparing the new value of the property with the old one and with your own domain list turns a noisy event into the check Microsoft's guidance asks for.
- Take each successful
Update applicationevent of the ApplicationManagement category in which a modified property is namedAppAddress. - Compare the old value and the new value of that modified property and keep the addresses that are only in the new value.
- Take the host name of each added address and compare it with the domains your organization owns and the hosting names it uses.
- Alert when an added address is outside that list, does not start with https (localhost aside), or contains a wildcard.
EventsUpdate application
LimitsMicrosoft documents the name of the property and not the layout of its value, so look at a few real events before you write the parser. Applications of software vendors legitimately use the vendor's domains, which have to be added to the list. A dangling address that is claimed later produces no event and is not found.
Redirect URI changed by an identity that became owner of the application shortly before
An attacker who can add owners to applications makes an account they control an owner and then uses the ownership to change the application. An owner added and a redirect URI changed by that same new owner within a few days is a takeover of the application in two steps, each of which looks routine alone.
- An owner is added: audit activity
Add owner to application, with the application and the new owner inTargetResources. - Within 7 days the same application is updated:
Update applicationwith a modified property namedAppAddress, where the actor inInitiatedByis the new owner of the first event. - Check the same window for credentials added to the application by that actor.
EventsAdd owner to applicationUpdate application
LimitsA developer who takes over an application from a colleague produces the same sequence, so confirm the handover. The 7 days are a starting point. A change made by an administrator role without ownership does not match.
Triage
- Read the application in TargetResources and the old and new value of the
AppAddressmodified property to see which address was added or removed. - Check the new address. An address without HTTPS, with a wildcard, on a domain you do not control or on a free hosting or tunnelling service needs an explanation.
- Identify the actor in InitiatedBy and check whether that identity normally maintains this application, and whether it became an owner of the application only recently.
- Look for other changes to the same application around the same time, such as new owners, new credentials or new permissions.
- If the change was not planned, review the sign-ins to the application since the change.
Response
Once the attack is confirmed:
- Remove the address from the application first, so that no further codes or tokens are sent to it.
- Revoke the sessions and refresh tokens of the users who signed in to the application after the address was added, because tokens that were already delivered stay valid when the address is gone.
- Contain the identity that made the change. Revoke its sessions, reset its credentials and remove its ownership of or role over the application.
- Review the application for other changes by the same actor, such as owners, credentials and permissions, and undo them.
- For a dangling address, remove it from every application that lists it and check whether the domain or host name can be recovered.
Mitigation
- Limit who can change app registrations. Review application owners, keep the application administrator roles small and remove write permissions on applications from service principals that do not need them.
- Review the redirect URIs of your applications regularly and remove addresses that are no longer used, above all addresses on domains or cloud host names the organization has given up.
- Do not register wildcard redirect URIs. Microsoft recommends absolute URIs only and warns against wildcards because of their security implications.
- Keep development and production in separate app registrations, so that local and test addresses are not accepted by the production application.
- Alert on redirect URI changes of applications that hold sensitive permissions or that many users sign in to.
Frequently asked questions
Why does the user not notice anything when a redirect URI was added by an attacker?
The sign-in takes place on the genuine Microsoft page and for an application the user knows. Only the address that receives the result is different, and that is shown after the sign-in has completed. No consent prompt appears either, because the application was approved before.
What is a dangling redirect URI?
It is a registered redirect URI whose domain name no longer exists or is not owned by the organization any more. Microsoft's security operations guide for applications names this case. Whoever registers the name afterwards holds an address the application already trusts, without having changed anything in the tenant, so no audit event is written at that moment.
Does the rule tell a harmless redirect URI from a malicious one?
No. It matches every successful update of an application in which the AppAddress property is named. Microsoft documents the property name and not the layout of its value, so the address itself is not matched. Read the old and the new value and apply the checks Microsoft lists, such as HTTPS, wildcards and domains you do not control.
Does removing the redirect URI end the attacker's access?
It stops new codes and tokens from reaching the address. Tokens that were already delivered remain valid until they expire or are revoked. Revoke the sessions of the users who signed in to the application while the address was registered.
References
- MITRE ATT&CK T1528: Steal Application Access Token
- Microsoft Entra security operations guide for applications (dangling URI and redirect URI changes, new owner)
- Redirect URI (reply URL) outline and restrictions
- Microsoft Entra audit log activities (ApplicationManagement category)
- Microsoft Graph: modifiedProperty resource type (old and new value of a changed property)
- Overview of enterprise application ownership in Microsoft Entra ID