In Entra ID, an OAuth consent is a permission grant to an application that is stored in the directory and does not depend on the password of the person who gave it. Controlling it means restricting user consent, reviewing existing grants and monitoring new consents and application credentials with KQL. Revoking a user's sessions invalidates the refresh tokens issued to applications, but the grant itself stays in Entra ID. Once application permissions or a secret added to an application come into play, no user is involved at all.
Midnight Blizzard took that second route against Microsoft itself in the attack the company disclosed in January 2024. In the guidance for responders it published at the time, Microsoft explains that the intruder password-sprayed an account in a legacy, non-production test tenant that had no MFA. From there, the attacker compromised a test OAuth application with elevated access, created further applications, set up a user to consent to them and granted them the Office 365 Exchange Online full_access_as_app role, which gives access to mailboxes.
The guide is aimed at IT and SOC teams in mid-sized organisations running Microsoft 365 and Entra ID. Paths, policies and cmdlets were checked against Microsoft Learn on 26 November 2026.
Which objects are involved when an application reads Microsoft 365 data?
Every application in Entra ID exists as two objects. The app registration sits in the publisher's tenant. The service principal, labelled an 'enterprise application' in the portal, represents it in each tenant that uses it, and its appOwnerOrganizationId property records the tenant that owns the registration. A third-party application therefore shows up in a customer's tenant only as a service principal.
There are two kinds of permission, and the difference decides what has to be monitored:
- Delegated permissions. The application acts for a signed-in user and can never exceed that user's rights. Grants are stored as oauth2PermissionGrant objects, with consentType 'Principal' when a user consented for themselves and 'AllPrincipals' when an administrator consented for the whole organisation. The offline_access permission lets the application renew its tokens without the user stepping in again.
- Application permissions. The application acts as itself through an app role assignment, with no user in the loop. They need admin consent and carry the most risk: Mail.ReadWrite granted as an application permission in Entra ID reaches every mailbox in the tenant. Exchange Online's role-based access control for applications can scope access to a group of mailboxes, but its grants add to those made in Entra ID, so the tenant-wide permission has to be removed from Entra ID for the scope to take effect.
An application authenticates as itself with secrets (passwordCredentials) or certificates (keyCredentials), held on the app registration or on the service principal. Whoever manages to add a credential to an application that already holds application permissions inherits them, and no new consent is required. Applications should therefore be treated as privileged non-human identities: each needs an owner, an inventory entry and periodic review.
How are consents abused, and what trace does each pattern leave?
Three patterns recur. They are described conceptually here, through what they leave in the logs.
Consent phishing
Consent phishing does not target the password. The user is asked to authorise a plausibly named third-party application that requests permissions such as Mail.Read and offline_access, and if tenant settings allow it, no administrator is involved in the grant. MITRE tracks it as Steal Application Access Token (T1528). The Entra audit log records a 'Consent to application' event and, when the application is new to the tenant, an 'Add service principal' event for the same service principal. The grant itself ('Add delegated permission grant') shares the CorrelationId of the consent, which is how Microsoft's Sentinel rule Suspicious application consent for offline access links them.
OAuth phishing through already authorised Microsoft applications
OAuth phishing campaigns reported in 2025 used the client IDs of Microsoft applications such as Visual Studio Code. The victim signs in on a genuine Microsoft page and hands over an authorisation code. Because the application belongs to Microsoft and is already authorised, no new consent is logged and the evidence sits in the sign-in logs. Restricting user consent does not stop this pattern. Device code phishing with Microsoft client IDs, as in the Storm-2372 campaign described by Microsoft, leaves no consent event either.
Credentials and roles added to existing applications
Midnight Blizzard used a privileged legacy application to grant roles to applications it had created. Adding a credential to an application that is already privileged is the most direct version of the same pattern, which MITRE classifies as Additional Cloud Credentials (T1098.001). According to the Entra audit activity reference, it produces 'Add service principal credentials', 'Update application - Certificates and secrets management' or 'Add app role assignment to service principal' events in the ApplicationManagement category. Sign-ins by the application itself then follow in the service principal sign-in log. This kind of persistence goes unnoticed when monitoring covers user accounts alone.
Which user consent setting should an organisation choose in Entra ID?
For a mid-sized organisation, the recommended setting is to switch user consent off and enable the admin consent workflow. Entra ID has four user consent behaviours, each backed by a permission grant policy. Drawing on Microsoft's documentation on app consent policies, the table shows what each one allows and how much upkeep it needs.
| Portal option | Underlying policy | What users can consent to | Upkeep | Main limitation |
|---|---|---|---|---|
| Allow user consent for apps | microsoft-user-default-legacy | Any permission that does not need an administrator, for any application | None | Lets Mail.Read or Files.Read.All through to unknown applications |
| Microsoft-managed consent settings | microsoft-user-default-recommended | Any user-consentable delegated permission except a high-risk list (Files.Read.All, Sites.Read.All, Mail.Read, Calendars.Read, Chat.Read, EWS.AccessAsUser.All and others) | Low | Microsoft updates the list automatically; permissions left off it, such as Mail.Send, Contacts.Read or Files.Read, stay open |
| Allow user consent for apps from verified publishers, for selected permissions | microsoft-user-default-low | Only applications from verified publishers or registered in the same tenant, and only permissions classified as low impact | Medium: permissions must be classified and the classification kept current | A verified publisher is no proof that an application is benign |
| Do not allow user consent | No managePermissionGrantsForSelf policy assigned | No permissions: every request goes to an administrator | High without a request workflow; moderate with one | Shifts the risk to reviewers, who may approve out of habit |
Checked against Microsoft Learn on 26 November 2026. Microsoft states that the managed option is the default for new tenants.
For a mid-sized organisation we recommend switching user consent off and enabling the admin consent workflow, provided someone can review requests within one or two working days. Without that capacity, the verified-publisher option with a minimal low-impact classification (User.Read, openid, profile, email) is the next choice. CISA policy MS.AAD.5.2v1 requires user consent to be restricted and accepts only these two options, while MS.AAD.5.3v1 requires an admin consent workflow. The Microsoft-managed option falls short of that baseline and works only as a stopgap.
Implementation: values and verification
User consent
The setting is under Entra ID > Enterprise apps > Consent and permissions > User consent settings. Changing it in the portal takes a Global Administrator. Through Graph, Microsoft's configuration guide says the Privileged Role Administrator role with the Policy.ReadWrite.Authorization scope is enough, and the change is written to the permissionGrantPoliciesAssigned property with values such as managePermissionGrantsForSelf.microsoft-user-default-low.
According to the documentation, the setting only affects future consent operations; existing grants stay as they are. The admin workflow should be ready before user consent is switched off, because consent requests from legitimate apps such as Outlook add-ins and mail clients will otherwise start failing.
Admin consent workflow
The workflow is enabled under Entra ID > Enterprise apps > Consent and permissions > Admin consent settings by setting 'Users can request admin consent to apps they are unable to consent to' to Yes. Before reviewers are named, three points from the workflow documentation apply: switching it on needs a Global Administrator and can take up to an hour; a reviewer gains no right to grant consent; and the page states that only a Global Administrator can approve requests for Microsoft Graph application permissions.
Microsoft's page on granting admin consent also lets a Privileged Role Administrator grant that consent, so the behaviour is best confirmed with a test request. Microsoft does not recommend a specific expiry period for requests; we recommend 7 to 14 days, with reminders on.
App registration by users
Under Entra ID > Users > User settings, 'Users can register applications' should be set to No, as CISA policy MS.AAD.5.1v1 requires. Microsoft's guidance on delegating app creation describes the procedure, which maps to the allowedToCreateApps property. Developers who need to register applications should be given the Application Developer role.
The PowerShell below checks the consent, registration and admin workflow settings without changing anything. When user consent is off, the first Graph PowerShell connection may need an administrator to approve the Microsoft Graph Command Line Tools application.
# Read-only check; a role such as Global Reader is enough.
Connect-MgGraph -Scopes 'Policy.Read.All'
$p = Get-MgPolicyAuthorizationPolicy
# Consent policies of the default user role.
$p.DefaultUserRolePermissions.PermissionGrantPoliciesAssigned
# False when users cannot register applications.
$p.DefaultUserRolePermissions.AllowedToCreateApps
# State of the admin consent workflow.
Get-MgPolicyAdminConsentRequestPolicy | Select-Object IsEnabled, NotifyReviewers, RemindersEnabled, RequestDurationInDays
When user consent is off, the first output contains only managePermissionGrantsForOwnedResource entries. If managePermissionGrantsForSelf.microsoft-user-default-legacy appears, users can authorise any application for permissions that do not need an administrator. If the request workflow is active, the last line reports IsEnabled as True. The dated output serves as audit evidence.
Restrictions on application credentials
App management policies (Entra ID > Enterprise apps > Application policies) can block new secrets and cap how long secrets and certificates remain valid, tenant-wide or with per-application exclusions. They need Security Administrator together with Application Administrator or Cloud Application Administrator, or a Global Administrator.
CISA recommends blocking new application passwords (MS.AAD.5.5v1), keeping their lifetime to 180 days or less (MS.AAD.5.6v1) and certificate lifetime to 365 days or less (MS.AAD.5.7v1); its implementation steps give 181 and 366 days as the values to enter in the portal. Microsoft's security operations guide for applications favours certificates from trusted authorities or managed identities over secrets.
The Graph reference for these policies makes clear that they do not block token issuance for existing applications: an application that breaks the policy keeps working, and only the create or update operation that breaks it is refused. The production risk lies in the next rotation, when whatever renews a secret automatically (a deployment pipeline, a script, a key vault job) will fail if it creates a secret the policy blocks or one that exceeds the maximum lifetime. Before the policy is turned on, the team needs to know which applications use secrets and who rotates them.
What has already been granted in the tenant?
Taking stock of existing grants is often postponed, and in our experience it is where most findings turn up. The script below lists delegated grants made for the whole organisation and by individual users, third-party applications with their verified publisher and the number of credentials each holds, and every application with application permissions on Microsoft Graph. The two excluded IDs are Microsoft tenants listed in Microsoft's guide to verifying first-party applications; the list is not exhaustive.
# Read-only inventory of delegated grants.
Connect-MgGraph -Scopes 'Application.Read.All','Directory.Read.All'
# Grants for the whole organisation.
Get-MgOauth2PermissionGrant -All -Filter 'consentType eq ''AllPrincipals''' | Select-Object ClientId, ResourceId, Scope
# Grants by individual users, grouped by application.
Get-MgOauth2PermissionGrant -All -Filter 'consentType eq ''Principal''' | Group-Object ClientId | Select-Object Name, Count, @{n='Scopes';e={(($_.Group.Scope -split ' ') | Where-Object { $_ } | Sort-Object -Unique) -join ' '}}
# Applications owned by other tenants, minus two Microsoft tenants (not exhaustive).
$t = (Get-MgContext).TenantId
$ms = @('f8cdef31-a31e-4b4a-93e4-5f571e91255a','72f988bf-86f1-41af-91ab-2d7cd011db47')
Get-MgServicePrincipal -All -Property Id,DisplayName,AppOwnerOrganizationId,VerifiedPublisher,PasswordCredentials,KeyCredentials | Where-Object { $_.AppOwnerOrganizationId -and $_.AppOwnerOrganizationId -ne $t -and $_.AppOwnerOrganizationId -notin $ms } | Select-Object Id, DisplayName, @{n='Publisher';e={$_.VerifiedPublisher.DisplayName}}, @{n='Secrets';e={$_.PasswordCredentials.Count}}, @{n='Certificates';e={$_.KeyCredentials.Count}}
# Applications holding application permissions on Microsoft Graph.
$graph = Get-MgServicePrincipal -Filter 'appId eq ''00000003-0000-0000-c000-000000000000'''
Get-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $graph.Id -All | Select-Object PrincipalDisplayName, PrincipalId, AppRoleId, CreatedDateTime
AppRoleId is a GUID. Turning it into a permission name requires a look-up of the app roles on the resource's service principal; for Exchange Online, the last query is repeated with its application ID. For large tenants, Microsoft's app consent response playbook points to a fuller inventory script that can run for hours.
What to look for in the results, following that playbook's criteria:
- Delegated permissions over mail, contacts, mailbox settings, people, files and notes (Mail.* except Mail.ReadBasic, Contacts.*, MailboxSettings.*, People.*, Files.*, Notes.*). Microsoft states that combinations of these six families appear in 99% of the consent phishing attacks it has seen.
- Application permissions that write to the directory or to roles, such as Application.ReadWrite.All, Directory.ReadWrite.All or RoleManagement.ReadWrite.Directory.
- AllPrincipals grants to non-Microsoft applications, misspelt or generic names, reply URLs on newly registered domains, and applications with no identifiable internal owner.
- Third-party service principals holding their own secrets in the tenant. SAML gallery applications store their signing certificate there and are the expected exception; anything else needs an explanation.
If the inventory turns up something suspicious, Microsoft advises disabling the application, not deleting it, since a deleted application can return if another user consents to it. Its grants, assignments, credentials and owners are exported first, because they are evidence. Then Update-MgServicePrincipal -ServicePrincipalId <Id> -AccountEnabled:$false disables it; Remove-MgOauth2PermissionGrant and Remove-MgServicePrincipalAppRoleAssignment remove the grants; Remove-MgServicePrincipalPassword or Remove-MgApplicationPassword delete the added secrets; certificates are removed by updating the keyCredentials property with Update-MgApplication or Update-MgServicePrincipal; and revoking the affected users' sessions invalidates their refresh tokens after a delay of a few minutes, according to Microsoft.
Disabling a legitimate application by mistake takes a service down, so the decision is confirmed with its owner or taken as a containment step within the incident response procedure. A finding like this is handled as an incident, with its own record and formal closure.
How is OAuth consent abuse detected with KQL?
The queries rely on two Log Analytics tables: AuditLogs, which holds the Entra audit log, and AADServicePrincipalSignInLogs, which holds application sign-ins. Both arrive through Entra ID diagnostic settings. Without that export, Entra keeps the logs for seven days on the Free edition and 30 on P1 and P2, and an investigation that starts late may not find the consent. If they are not yet in the organisation's SIEM, they belong among the first sources to onboard.
1. Consents that include risky permissions
// Consents over 30 days with permissions from the risky families.
AuditLogs
| where TimeGenerated > ago(30d)
| where OperationName == 'Consent to application' and Result =~ 'success'
| extend App = tostring(TargetResources[0].displayName), SpId = tostring(TargetResources[0].id)
| extend User = tostring(InitiatedBy.user.userPrincipalName)
// Property dictionary without quotes.
| mv-apply mp = TargetResources[0].modifiedProperties on (summarize Props = make_bag(bag_pack(tostring(mp.displayName), trim(@'[\"\s]+', tostring(mp.newValue)))))
| extend Permissions = tostring(Props['ConsentAction.Permissions'])
| extend IsAdmin = tostring(Props['ConsentContext.IsAdminConsent']), WholeOrg = tostring(Props['ConsentContext.OnBehalfOfAll'])
// Families from Microsoft's playbook, excluding Mail.ReadBasic.
| where Permissions matches regex @'(?i)\b(Mail\.(Read|ReadWrite|Send)(\.Shared)?|Contacts\.\w+|MailboxSettings\.\w+|People\.\w+|Files\.\w+|Notes\.\w+)\b'
or Permissions has_any ('Directory.AccessAsUser.All', 'EWS.AccessAsUser.All', 'user_impersonation')
| project TimeGenerated, User, App, SpId, IsAdmin, WholeOrg, Permissions, CorrelationId
ConsentContext.IsAdminConsent tells an administrator's consent from a user's, and ConsentContext.OnBehalfOfAll shows whether it covered the whole organisation. The regular expression leaves out Mail.ReadBasic, as Microsoft's playbook does. Common false positives come from third-party mail clients, line-of-business applications approved by IT and incremental consent: if a user adds User.Read to an application that already had Mail.Read, the event still matches, because the value holds both the old and the new permissions.
Exclusions are made by SpId after each case has been reviewed, never by display name, which the attacker chooses. Failed consents (Result other than success) deserve a look as well, since a blocked attempt can be an early sign of a campaign. Application permissions do not appear here; the third query covers them.
2. New credentials on applications
// Credentials added to service principals or app registrations.
// Hunting query; for alerting, the official Sentinel rule.
AuditLogs
| where TimeGenerated > ago(30d)
| where OperationName has_any ('Add service principal credentials', 'Certificates and secrets management')
| where Result =~ 'success'
| extend Actor = coalesce(tostring(InitiatedBy.user.userPrincipalName), tostring(InitiatedBy.app.displayName))
// Object receiving the credential.
| extend Target = tostring(TargetResources[0].displayName), TargetId = tostring(TargetResources[0].id)
// Output columns.
| project TimeGenerated, OperationName, Actor, Target, TargetId, CorrelationId
| order by TimeGenerated desc
The query starts from the same activities as the Microsoft Sentinel rule 'NRT New access credential added to Application or Service Principal', which matches 'Add service principal' more broadly and so also catches service principals created with a credential. The rule also compares old and new KeyDescription values to keep only newly added credentials. For alerting, the rule is the better option; this version serves for looking back through history.
Microsoft's security operations guide rates credentials added to existing applications outside normal hours or workflows as high risk. Noise comes mainly from deployment pipelines and automation accounts that rotate secrets, which can be excluded by actor once the rotation is confirmed as documented, and from SAML applications generating signing certificates.
3. Privileged application permissions
// Privileged application permissions assigned to a service principal.
// TargetResources[0] is the API; the client sits in the properties.
AuditLogs
| where TimeGenerated > ago(30d)
| where OperationName == 'Add app role assignment to service principal' and Result =~ 'success'
| mv-apply mp = TargetResources[0].modifiedProperties on (summarize Props = make_bag(bag_pack(tostring(mp.displayName), trim(@'[\"\s]+', tostring(mp.newValue)))))
// Granted role and client application.
| extend Role = tostring(Props['AppRole.Value'])
| extend Client = tostring(Props['ServicePrincipal.DisplayName']), ClientSpId = tostring(Props['ServicePrincipal.ObjectID'])
// Broad criterion: tenant-wide, mail, roles or Exchange.
| where Role matches regex @'(?i)(\.All$|^Mail\.|^RoleManagement\.|full_access_as_app|Exchange\.ManageAsApp)'
| extend Actor = coalesce(tostring(InitiatedBy.user.userPrincipalName), tostring(InitiatedBy.app.displayName))
// Output columns.
| project TimeGenerated, Actor, Role, Client, ClientSpId, Api = tostring(TargetResources[0].displayName), CorrelationId
In this event TargetResources[0] is the API granting the permission, Microsoft Graph for example, while the application receiving it appears in the ServicePrincipal.DisplayName and ServicePrincipal.ObjectID properties, as in the Sentinel rules. Microsoft rates highly privileged app role assignments on Microsoft Graph as high risk, and full_access_as_app is the Exchange Online role Midnight Blizzard used. In our experience a mid-sized organisation sees this event a handful of times a quarter; outside an approved change, each occurrence warrants investigation.
4. A newly added credential used from a new address
// New credentials in 7 days.
let withCredential = AuditLogs
| where TimeGenerated > ago(7d)
| where OperationName == 'Add service principal credentials' and Result =~ 'success'
| summarize Added = min(TimeGenerated) by SpId = tostring(TargetResources[0].id);
// Addresses from the previous 30 days.
let usual = AADServicePrincipalSignInLogs
| where TimeGenerated between (ago(37d) .. ago(7d))
| distinct ServicePrincipalId, IPAddress;
// New sign-ins after the addition.
AADServicePrincipalSignInLogs
| where TimeGenerated > ago(7d) and ResultType == '0'
| join kind=inner withCredential on $left.ServicePrincipalId == $right.SpId
| where TimeGenerated > Added
// Drop the usual addresses.
| join kind=leftanti usual on ServicePrincipalId, IPAddress
| project TimeGenerated, ServicePrincipalName, AppId, IPAddress, ServicePrincipalCredentialKeyId, Added
This query covers the second half of the pattern: a service principal receives a credential and starts authenticating from an IP address it had not used in the 30 days before the last week. ServicePrincipalCredentialKeyId identifies the credential that signed in, so it can be compared with the new one. Three limitations apply.
Credentials added to the app registration cannot be joined directly, because the audit event carries the application object ID while sign-ins carry the AppId, so a lookup table built with Get-MgApplication is needed. Addresses used between the start of the window and the credential's addition count as new. And every sign-in from an application with no history shows as new. It suits threat hunting better than alerting.
How can the detections be validated safely?
Validation uses test objects created for the purpose and never touches production applications. A test application that requests only User.Read is registered, User.Read is added temporarily to the expression in the first query, and a test user consents; if user consent is already off, the test uses an admin consent or runs before the change.
A secret with a one-day expiry is then added to the application, which should trigger the second query. If an app management policy already blocks secrets, the test application needs an exclusion or a certificate in its place. For the third, the test application is assigned a role from a test API owned by the organisation, never from Graph, and the expression is widened to include it. Events can take a while to reach Log Analytics, so a query should not be declared failed too early. Once testing is complete, the secret, the role and the application are deleted and the queries restored.
Where does the control fall short?
- The admin consent workflow hands the decision to reviewers. Without written criteria (which permissions are acceptable, who owns the application internally, when it is reviewed again), most requests end up approved.
- Microsoft's response playbook notes that the Azure portal shows admin consents for the last 90 days only. A full record depends on having exported the events to the SIEM in time.
- Federated identity credentials give an application another way to authenticate without a secret. The Entra audit activity reference lists no dedicated event for them, and the second query does not detect them. Before a rule is built, each organisation needs to confirm in a test tenant which operation and modified property record their creation.
The same problem appears beyond Microsoft: the data thefts from customers' Salesforce instances through connected apps followed much the same logic, and token theft after a Microsoft 365 account takeover relies on access that no consent restriction stops. Delegating permissions to a third party creates a supplier relationship that is not always recorded as one.
Audit evidence for ENS, ISO 27001 and NIS2
These controls serve several frameworks at once: Annex II of Royal Decree 311/2022, Annex A of ISO/IEC 27001:2022 and Article 21 of the NIS2 Directive. The mapping below is our technical interpretation and should be aligned with each organisation's statement of applicability. ENS is Spain's National Security Framework, mandatory for the Spanish public sector and its suppliers.
| Control | ENS (RD 311/2022) | ISO/IEC 27001:2022 Annex A | NIS2 Art. 21(2) | Useful evidence |
|---|---|---|---|---|
| Restricted user consent and limited app registration | op.acc.4 Access rights management process | 5.15 Access control; 5.18 Access rights | Point (i) | Dated output of Get-MgPolicyAuthorizationPolicy |
| Admin consent workflow with reviewers | op.acc.3 Segregation of duties and tasks | 8.2 Privileged access rights | Point (i) | History of approved and denied requests |
| Periodic inventory of third-party applications and their permissions | op.nub.1 Protection of cloud services; op.ext.3 Supply chain protection | 5.23 Information security for use of cloud services | Point (d) | Exported inventory with owner and review date |
| Detection of consents and new credentials | op.exp.8 Activity logging; op.mon.3 Monitoring | 8.15 Logging; 8.16 Monitoring activities | Not applicable | Active SIEM rules and validation results |
Point (d) covers supply chain security; point (i) covers, among other matters, access control policies. ENS control names are our translation.
Where to start
The usual starting point is restricting user consent, which is a simple change. Yet in the Midnight Blizzard case the damage came from applications with application permissions to which the attacker gave new roles. Our priority is different: the first step is to list the service principals with application permissions on Microsoft Graph or Exchange Online, give each an owner and switch on the Sentinel credential rule and the third query as alerts. There are usually only a handful of such applications and, once documented rotations are excluded, every alert can be reviewed by hand. User consent can be tightened afterwards, on top of a finished inventory.
Two controls that need additional licences complete the picture. Conditional Access for workload identities (Workload Identities Premium licence) can block sign-ins by single-tenant service principals from outside known address ranges. App governance in Microsoft Defender for Cloud Apps shows the permissions each OAuth application holds and raises alerts on anomalies in its activity.
For teams that want outside help, our Microsoft 365 security and non-human identity security services review these points alongside the rest of the tenant configuration, and continuous monitoring of these queries fits within a managed SOC.
Sources and methodology: Microsoft Learn documentation on app consent, app management policies, Microsoft Graph and Entra ID logs; Microsoft Security blog guidance on Midnight Blizzard and Storm-2372; MITRE ATT&CK techniques T1528 and T1098.001; the CISA SCuBA baseline for Entra ID; Microsoft Sentinel rules in the Azure-Sentinel GitHub repository; Royal Decree 311/2022 in the BOE and Directive (EU) 2022/2555 on EUR-Lex. Queries and scripts were reviewed against official documentation; the regulatory mapping and the suggested request expiry are our own judgement. Information checked as of 26 November 2026.
Disclaimer: this content is indicative and does not replace an auditor's judgement or professional advice. Microsoft changes portal options, log schemas and Graph permissions frequently. Configurations, commands and queries should be tested in a controlled environment before they reach production, with their impact on existing integrations assessed and the queries adapted to each SIEM's data and retention.
Frequently asked questions
Does resetting a user's password remove the permissions they granted to an application?
▾
No. Neither a password reset nor session revocation removes the grant. Session revocation cancels the refresh tokens the application held, but the grant remains in the directory and has to be removed separately with Remove-MgOauth2PermissionGrant. If the application also has application permissions or its own credentials, the user's password plays no part in its access.
What is the difference between delegated and application permissions in Entra ID?
▾
A delegated permission keeps the application within the rights of the user who granted it. An application permission gives it an identity of its own and reach across the organisation, every mailbox for instance, unless it is scoped down. That is why application permissions need admin consent and should be the first to be inventoried.
Is the Microsoft-managed consent setting enough?
▾
As a stopgap, yes; as a target, no. Microsoft decides which permissions it blocks, and those left off the list, such as Mail.Send or Contacts.Read, remain within reach of any application. CISA's baseline accepts only switching user consent off or limiting it to verified publishers and low-impact permissions.
Does restricting consent protect against OAuth phishing?
▾
Only against the kind that asks users to authorise a third-party application. Campaigns that reuse already authorised Microsoft applications, like those documented in 2025, and token theft after an account takeover produce no new consent. Conditional Access and sign-in review are the defence there.
What should be done when a suspicious application with granted permissions is found?
▾
Its grants, assignments, credentials and owners are exported first as evidence, and the application is then disabled, because a deleted application can come back with a fresh consent. After that, grants, secrets and certificates are removed, the sessions of the users who consented are revoked and the data it read is assessed. The case is handled as an incident.
How long does Entra ID keep consent events?
▾
In the audit log, a week on the Free edition and a month with P1 or P2 licences. The Azure portal shows admin consents for the last 90 days, but a user consent from two months ago can only be investigated in detail if the logs were already flowing to Log Analytics, Microsoft Sentinel or another SIEM.
Which ENS and ISO 27001 controls does this configuration relate to?
▾
Mainly access rights management (op.acc.4 in ENS; 5.15 and 5.18 in ISO 27001:2022), protection of cloud services and the supply chain (op.nub.1 and op.ext.3; 5.23) and activity logging and monitoring (op.exp.8 and op.mon.3; 8.15 and 8.16). Dated output from the verification checks works as evidence.