Skip to main content
Sprawlsight
Sign inFree self-assessment
Menu

How to audit Microsoft 365 permissions for hidden access

By The Sprawlsight team · · 8 min read

permissionsentrasecurity

In short

A Microsoft 365 permissions audit should measure what each identity can actually reach, not just the names listed on a site. Check three side doors: nested groups that widen membership, admin rights that never expire, and apps people consented to. Expand nested groups, make admin access just-in-time, restrict user consent, then review access on a schedule.

Most permission reviews start with a site and ask who is listed on it. That misses the people, apps and agents who get in another way. Effective access is everything an identity can actually reach, directly or indirectly. This guide audits it through three side doors that site permission reports rarely show: nested groups, standing admin rights and app consent.

What is permission sprawl?

Permission sprawl is access that reaches people, apps and agents through side doors instead of through assignments someone reviews. It builds up quietly in three places:

  • Indirect group membership. A security group that grants access contains other groups, so the real member list is longer than the one you see.
  • Standing admin rights. Admin roles assigned permanently, used rarely and never taken back.
  • Permissions delegated to apps. Apps that users or admins consented to, which keep their access long after anyone remembers why.

None of these shows up when you open a site's permissions page and read the names. All three decide what an identity can actually reach.

Why does hidden access matter for Copilot and agents?

Hidden access matters because Microsoft 365 Copilot and agents work with whatever access their identity already has. Microsoft states that Microsoft 365 Copilot only surfaces organizational data to which individual users have at least view permissions. If a nested group gives someone view access to a finance site, Copilot can ground its answers in that site for them.

Apps follow the same rule, with one difference. An app with delegated permissions acts on behalf of a signed-in user and can't reach anything that user couldn't. An app with application permissions acts as itself and reaches everything the permission covers. Microsoft's own example: an app granted the Microsoft Graph application permission Files.Read.All can read any file in the tenant (permissions and consent overview).

Any user, app or agent inherits whatever its identity can reach. Auditing identities is how you put a boundary on what AI can see.

How do nested groups hide who really has access?

Nested groups hide access because a site or policy shows one group name, while the people behind it come from every group inside it. In Microsoft Entra ID, security groups can contain other security groups. Microsoft 365 groups can't contain other groups, and neither can groups used to assign Entra roles (how to manage groups). Nesting also stops short of some resources: app assignments in Microsoft Entra ID and group-based licenses don't reach the members of nested groups. So the risk sits with security groups that grant access to SharePoint sites or scope Conditional Access policies, including the groups a policy excludes.

SharePoint lets you add security groups to a site's Owners, Members or Visitors groups. Microsoft's guidance notes that nested security groups can cause performance issues and aren't recommended.

List transitive memberships

"Transitive" means direct plus nested. Microsoft Graph PowerShell returns both in one call:

Connect-MgGraph -Scopes "Directory.Read.All"

<# Every user who reaches this group, directly or through nesting #>
Get-MgGroupTransitiveMemberAsUser -GroupId "<group-object-id>" -All

<# Every group this person belongs to, including nested ones #>
Get-MgUserTransitiveMemberOf -UserId "<user-object-id>" -All

Compare the users the first command returns with the group's direct members. A large gap means the group grants access to people its owner may never have seen.

When to flatten

Flatten a nested group when it grants access to sensitive content, when nesting goes more than one level deep, or when nobody owns the inner group. Replace the chain with one owned group whose members are people, or with a dynamic membership group if you have Microsoft Entra ID P1. Sprawlsight's free snapshot checks this as SPR-008 "Groups aren't nested inside other groups".

Why is standing admin access a risk, and what replaces it?

Standing admin access is a role assignment that is always active, so a stolen password or session for that account carries admin power at any hour. The replacement is just-in-time access, where people hold a role only while they need it.

Work through it in this order:

  1. Count Global Administrators. Microsoft recommends assigning the role to fewer than five people and keeping privileged role assignments under 10.
  2. Use least-privileged roles. Someone who resets passwords for non-admins needs Password Administrator, not Global Administrator. Microsoft's least privileged roles by task table maps common jobs to the narrowest role.
  3. Move admins to eligible assignments. In Privileged Identity Management (PIM), an eligible assignment gives the same access as a permanent one. The difference is that the person must activate it for a limited time, with MFA, a justification or an approval. PIM requires Microsoft Entra ID P2 or Microsoft Entra ID Governance licenses.
  4. Keep two break-glass accounts. Microsoft recommends two or more cloud-only emergency access accounts. Assign them Global Administrator as permanent active, and protect them with phishing-resistant sign-in such as passkeys. Exclude them from Conditional Access policies that block or restrict sign-in, and alert on every use. These accounts are the planned exception to just-in-time access, not a template for everyone else.

How do you review apps people have consented to?

You review them in Microsoft Entra ID under Enterprise applications, where each app shows what it was granted. In the Microsoft Entra admin center, go to Entra ID > Enterprise apps > All applications, select an app, then select Permissions. The Admin consent tab shows grants that apply to the whole organization. The User consent tab shows grants individual users made (review permissions granted to enterprise applications).

Look for:

  • Broad Microsoft Graph application permissions such as Files.Read.All, Sites.Read.All or Mail.Read.
  • Delegated grants consented for all users when only a few people use the app.
  • Apps from publishers you don't recognize, and apps nobody has signed in to recently.

Revoke what isn't needed. You can revoke admin-consented permissions in the portal, but user-consented grants have to be removed with Microsoft Graph or PowerShell. Revoking doesn't stop a user from consenting again, which is why the next setting matters.

Set user consent to Do not allow user consent or Allow user consent for apps from verified publishers, for selected permissions. Then turn on the admin consent workflow so users can request anything else. Users shouldn't be able to grant apps access to organizational data on their own.

The setting is under Enterprise apps > Consent and permissions > User consent settings:

Option What users can consent to
Do not allow user consent Nothing. Every app needs an admin.
Allow user consent for apps from verified publishers, for selected permissions Only permissions you classify as low impact, for verified publishers or apps registered in your tenant
Let Microsoft manage your consent settings Most delegated permissions, except a Microsoft-maintained list of sensitive ones such as broad file, mail and calendar access. The default for new tenants.
Allow user consent for apps Any permission that doesn't require admin consent, for any app

For most small and mid-sized organizations, pick Do not allow user consent or the verified-publishers option. Then turn on the admin consent workflow under Admin consent settings, so users can request an app and named reviewers review it. Reviewers can deny or block a request, but approving it takes a role that can grant admin consent (Global Administrator for Microsoft Graph application permissions). Changing the user consent setting only affects future consent, and existing grants stay until you remove them (configure how users consent to applications). Sprawlsight's free snapshot checks this as ENTRA-030 "Users can't consent to applications on their own".

How do you run a Microsoft 365 permissions audit?

Run it in four passes: export role assignments, expand the groups that grant access, export app permission grants, then triage what you find. Use a read-only role such as Global Reader, and save each export so you can compare runs. If Microsoft Graph PowerShell doesn't have these read permissions in your tenant yet, an admin who can grant consent has to approve them once first.

  1. Export role assignments. List every active assignment, then every eligible one. Flag permanent Global Administrators beyond your emergency accounts, guests or synced accounts in admin roles, and service principals (the identities apps use) that hold roles.
  2. Expand the groups that grant access. Find each security group that grants access to a sensitive SharePoint site or appears in a Conditional Access policy, especially as an exclusion. List its transitive members and compare them with the direct members. Nesting doesn't pass on roles or app assignments, so for groups that hold those, check direct members and owners instead.
  3. Export app permission grants. Pull delegated grants (OAuth2 permission grants) for the whole tenant and the application permissions held by each app. Flag grants with a consentType of AllPrincipals on broad scopes, and any application permission on Microsoft Graph.
  4. Triage. Fix standing Global Administrators first, then apps with application permissions, then nested groups on sensitive sites. Give every finding an owner and a due date.
Connect-MgGraph -Scopes "Directory.Read.All","RoleManagement.Read.Directory"

<# Active Global Administrator assignments (62e90394-... is the Global Administrator role) #>
Get-MgRoleManagementDirectoryRoleAssignment -Filter "roleDefinitionId eq '62e90394-69f5-4237-9190-012177145e10'" -ExpandProperty principal

<# Eligible role assignments in PIM #>
Get-MgRoleManagementDirectoryRoleEligibilitySchedule -All

<# Delegated permission grants across the tenant #>
Get-MgOauth2PermissionGrant -All

For application permissions, run Get-MgServicePrincipalAppRoleAssignment -ServicePrincipalId <id> against each app you want to inspect.

The three side doors at a glance

Side door How to find it How to close it
Nested groups Transitive member lists for groups that grant access Flatten to one owned group and review its members on a schedule
Standing admin rights Active and eligible role assignments Least-privileged roles, eligible assignments in PIM, two emergency accounts
App consent Enterprise apps > Permissions, plus an OAuth grant export Revoke unused grants, restrict user consent, turn on the admin consent workflow

How do you keep permission sprawl from coming back?

Make access expire unless someone confirms it. Access reviews can recur weekly, monthly, quarterly or annually. Review Microsoft Entra roles in PIM, and ask group owners to review the members of groups that grant access. Access reviews require Microsoft Entra ID Governance or Microsoft Entra Suite, and some capabilities work with Microsoft Entra ID P2.

Reviews only work when someone owns the group, so pair them with the steps in ownerless teams and sites. Remove accounts and guests that no longer sign in, covered in inactive guests and accounts, because a dormant account inside a nested group is still a member. For how permissions fit with the other kinds of sprawl, read Microsoft 365 sprawl.

Sprawlsight's Sprawl Score measures this area as Permission Sprawl, one of six kinds of sprawl. Permission Sprawl asks one question: who has access through a side door? For the full clean-up playbook and a checklist, get the permission sprawl field guide.

Frequently asked questions

What is a Microsoft 365 permissions audit?

A Microsoft 365 permissions audit is a review of who and what can reach your data, including access that arrives indirectly. A useful audit covers admin role assignments, nested group memberships and the permissions apps received through consent, not only the names listed on each site.

How do I see who has admin rights in Microsoft 365?

In the Microsoft Entra admin center, go to Entra ID > Roles & admins and open a role to see its assignments. In Microsoft Graph PowerShell, Get-MgRoleManagementDirectoryRoleAssignment lists active assignments. If you use Privileged Identity Management, Get-MgRoleManagementDirectoryRoleEligibilitySchedule lists eligible ones too.

Do nested groups give people access to SharePoint sites?

Yes. When a security group added to a site contains other security groups, their members can reach the site as well, but the site's permissions page shows only the outer group. List the group's transitive members to see everyone. Microsoft also notes that nested security groups can cause performance issues in SharePoint and aren't recommended.

What is the difference between delegated and application permissions?

Delegated permissions let an app act on behalf of a signed-in user, so it can't reach anything that user couldn't. Application permissions let an app act as itself with no user present, so it reaches everything the permission covers across the tenant. Only an admin can consent to application permissions.

Does restricting user consent remove apps people already approved?

No. Changing the user consent setting only affects future consent, and existing grants stay in place until you remove them. You can revoke admin-consented permissions in Enterprise applications, but grants that users made have to be removed with Microsoft Graph or PowerShell.

Related reading

· 9 min read

Clean up inactive guests and accounts in Entra ID

A safe, repeatable way to clean up inactive guest accounts, stale users, idle admins and unused app registrations in Microsoft Entra ID: disable before delete.

identityentraguests