Skip to main content
KBY Technologies Logo

Setting Up Recurring Entra ID Access Reviews for Guests

A production runbook for junior identity engineers to configure, pilot and audit recurring Entra ID access reviews of guest accounts using Microsoft Graph PowerShell.

KBY Technologies13 min readIntermediate55 min
Setting Up Recurring Entra ID Access Reviews for Guests

Advertising disclosure: this article includes partner links. KBY may earn a commission if you sign up or buy through one, at no extra cost to you. How we make money.

Before you begin

  • Basic Entra ID administration and B2B guest concepts
  • Familiarity with Microsoft Graph PowerShell SDK
  • Understanding of dynamic group membership rules

Underlined words are defined in the KBY Lexicon. Tap or click one to see what it means.

An auditor asking for proof that outside guests still need their access is a request you may well be handed early on, and it can feel vague at first. Clearing out old guests once looks busy but leaves no record of a regular check. A review that repeats on a schedule, built with Microsoft Graph PowerShell, does the job.

#Operational requirement

Guest accounts pile up. Every project that invites a contractor, auditor or partner through B2B collaboration leaves an Entra ID guest object behind, and many collaborations have no clear end date, so it isn’t obvious when a guest no longer needs access.

The result is guests who are still members of groups and teams for projects that finished long ago, with the files, calendars and conversations that membership brings. When an auditor asks for evidence that guest access is recertified periodically, a one-off clean-up doesn’t answer it. A documented review that runs on a schedule does.

The scope decides whether the review does anything. Microsoft documents that access review decisions don’t change membership in dynamic groups, because the group’s rule decides who is in it, so a review of a catch-all dynamic “all guests” group records decisions and removes nobody. This guide reviews guests where their access comes from, their membership of Microsoft 365 groups, and treats deleting guest accounts as a separate, deliberate step.

#Prerequisites and required permissions

Check licensing first. Microsoft’s guide to creating an access review lists Governance or Microsoft Entra Suite licences, and its licensing fundamentals page says access reviews need ID Governance for your member users, including every employee who reviews access, while some capabilities might operate with Microsoft Entra ID P2.

Guests are billed separately, by monthly active users through a linked Azure subscription, and inactive-user reviews and machine-learning-assisted reviews that include guests are billable. The review in this guide uses neither. Global Administrator will not get you past a licensing gate.

Identity Governance Administrator is the role Microsoft names for creating access reviews, so Global Administrator should not be needed. In production, request a Privileged Identity Management (PIM) eligible assignment for that role and activate it only for the build window.

You also need the Microsoft Graph PowerShell SDK (the Microsoft.Graph.Identity.Governance module provides the access review cmdlets), an approved change ticket, and a named fallback reviewer for groups that have no owner.

Request only the delegated scopes you need. Creating, stopping and applying access reviews uses AccessReview.ReadWrite.All, the least-privileged permission for those calls. GroupMember.Read.All covers listing groups, their owners and their members. Re-adding a guest during rollback needs GroupMember.ReadWrite.All, so request it only then. Find-MgGraphCommand shows the permissions for any cmdlet.

1Install-Module Microsoft.Graph.Authentication -Scope CurrentUser
2Install-Module Microsoft.Graph.Identity.Governance -Scope CurrentUser
3Install-Module Microsoft.Graph.Groups -Scope CurrentUser
4Connect-MgGraph -Scopes "AccessReview.ReadWrite.All","GroupMember.Read.All"

#Step 1: Scope the review and get change sign-off

Action: write down what the review covers and what it does not. The production review uses Microsoft’s built-in option for guests, All Microsoft 365 groups with guest users: a recurring review of the guest members of every Microsoft 365 group and team. Its scope is always Guest users only, meaning Microsoft Entra B2B guests. Dynamic groups and role-assignable groups are left out. Each group becomes its own review instance, reviewed by that group’s owners.

State the limits in the change record. A denial, once applied, removes the guest from that one group; they can still sign in and keep any other access. Access granted outside Entra group membership, such as direct membership of a SharePoint site, is not reviewed here. Removing guest accounts from the tenant is a separate review (Step 4).

Expected result: a change record stating the scope, recurrence, reviewers, fallback reviewer and the handling of non-response.

Evidence to capture: the change ticket number and a scope statement such as “Quarterly review of guest members of all Microsoft 365 groups (dynamic and role-assignable groups excluded); reviewers: group owners, with a named fallback reviewer; 14-day window. Pilot: results applied by hand; no automatic decision for unreviewed guests.”

Checkpoint: do not proceed without a signed-off change record. Enabling auto-apply or a default decision later is a production change.

#Step 2: List the groups the review will reach

There is no group to build: the review finds Microsoft 365 (Unified) groups itself. What you need first is a list of those groups and their owners, because an ownerless group goes to the fallback reviewer and a dynamic or role-assignable group is not reviewed at all.

Entra ID access reviews for guest accounts
1$groups = Get-MgGroup -Filter "groupTypes/any(c:c eq 'Unified')" -All `
2 -Property "id,displayName,groupTypes,isAssignableToRole"
3$report = foreach ($g in $groups) {
4 [pscustomobject]@{
5 Group = $g.DisplayName
6 Id = $g.Id
7 Owners = @(Get-MgGroupOwner -GroupId $g.Id -All).Count
8 Dynamic = $g.GroupTypes -contains "DynamicMembership"
9 RoleAssignable = [bool]$g.IsAssignableToRole
10 }
11}
12$report | Export-Csv m365-groups-before-review.csv -NoTypeInformation

Expected result: a CSV of every Microsoft 365 group with its owner count. Rows with Dynamic or RoleAssignable set to True are outside the review.

Evidence: attach the CSV to the change ticket.

Checkpoint: get owners added to ownerless groups that matter, and decide how guests in dynamic groups are handled. A review decision cannot take anyone out of a dynamic group, so either change its rule or, for guests who no longer need to be in the tenant, use the removal review in Step 4.

#Step 3: Create the recurring review definition

The body below follows Microsoft’s Graph example for reviewing guest users with direct membership of any Microsoft 365 group: instanceEnumerationScope picks the groups, scope picks each group’s guest members, and ./owners makes each group’s owners its reviewers. The query strings use single quotes so PowerShell does not read $filter as a variable. Set startDate to a future date whose day matches dayOfMonth, and test in a non-production tenant first.

1$params = @{
2 displayName = "Quarterly guest review of Microsoft 365 groups"
3 descriptionForAdmins = "Recurring recertification of guest members of all Microsoft 365 groups."
4 descriptionForReviewers = "Confirm each guest still needs to be a member of this group. Denied guests are removed from the group."
5 instanceEnumerationScope = @{
6 "@odata.type" = "#microsoft.graph.accessReviewQueryScope"
7 query = '/groups?$filter=(groupTypes/any(c:c eq ''Unified''))'
8 queryType = "MicrosoftGraph"
9 }
10 scope = @{
11 "@odata.type" = "#microsoft.graph.accessReviewQueryScope"
12 query = './members/microsoft.graph.user/?$filter=(userType eq ''Guest'')'
13 queryType = "MicrosoftGraph"
14 }
15 reviewers = @(
16 @{ query = "./owners"; queryType = "MicrosoftGraph" }
17 )
18 fallbackReviewers = @(
19 @{ query = "/users/<FallbackReviewerObjectId>"; queryType = "MicrosoftGraph" }
20 )
21 settings = @{
22 mailNotificationsEnabled = $true
23 reminderNotificationsEnabled = $true
24 justificationRequiredOnApproval = $true
25 recommendationsEnabled = $false
26 defaultDecisionEnabled = $false
27 instanceDurationInDays = 14
28 autoApplyDecisionsEnabled = $false
29 recurrence = @{
30 pattern = @{ type = "absoluteMonthly"; dayOfMonth = 1; interval = 3 }
31 range = @{ type = "noEnd"; startDate = "<yyyy-MM-01>" }
32 }
33 }
34}
35New-MgIdentityGovernanceAccessReviewDefinition -BodyParameter $params

Expected result: a new schedule definition with a GUID identifier. There is no applyActions entry because removing access is the default. In the Entra admin centre the same review is ID Governance > Access Reviews > New access review > Review access to a resource type > Teams + Groups > All Microsoft 365 groups with guest users. If the cmdlet is not found, run Get-Command -Module Microsoft.Graph.Identity.Governance *AccessReview* to find the name your module version uses.

Evidence: capture the returned Id; you need it to edit, stop or delete the review.

Checkpoint: confirm under ID Governance > Access Reviews that the recurrence and scope are right. Once an instance starts, Get-MgIdentityGovernanceAccessReviewDefinitionInstance returns one instance for each group with guests.

#Step 4: Decide what a denial and a non-response do

In this review a denial has one effect: when results are applied, the guest is removed from that group. The guest can still sign in to your tenant but is no longer a member of the group and no longer has the access granted through it. Action to apply on denied guest users cannot be changed on an All Microsoft 365 groups with guest users review.

With autoApplyDecisionsEnabled = $false and no default decision, nothing is removed until someone applies the results, and unreviewed guests keep their membership. Only after the pilot and sign-off should you consider a default decision: If reviewers don’t respond in the portal (No change, Remove access, Approve access or Take recommendations), or defaultDecisionEnabled with defaultDecision in Graph.

Microsoft warns that Remove access or Take recommendations with Auto apply results to resource could revoke all access to a resource if reviewers fail to respond, so if you enable it, update the reviewer description and the change record. Reminders reach reviewers halfway through the review; check that mailbox rules are not hiding them.

Removing guests from the tenant is a different review. On a review created with Select Teams + groups and scoped to Guest users only, Action to apply on denied guest users offers Block user from signing-in for 30 days, then remove user from the tenant (disableAndDeleteUserApplyAction in Graph).

It blocks a denied guest whatever other access they hold and deletes the account if no administrator re-enables it within 30 days.

It is best used as a last step, for guests you have confirmed no longer have resource access, and the review stays in the Applying state for those 30 days, when you cannot view its settings, results, reviewers or audit logs. Run it as its own change.

#Step 5: Pilot one group before going tenant-wide

Pilot on one project’s group first, with a reviewer who has agreed to act within the window. In the admin centre, create a separate review: Teams + Groups, Select Teams + groups, that Microsoft 365 group, scope Guest users only, denied guests left at Remove user’s membership from the resource, and Auto apply results to resource off. The group needs at least two test guests.

This is your hands-on validation task. Have the reviewer approve one guest and deny the other in My Access. When the duration ends, or after you stop the instance, go to Review history under Series, select the instance and choose Apply. The status moves from Completed through Applying to Result applied, and denied users should leave the group within a few minutes. Confirm it at the group, not just in the review record:

Get-MgGroupMember -GroupId "<PilotGroupId>" -All | Select-Object Id

The denied guest should be gone and the approved one still there. In Graph, applying is the applyDecisions action on the instance, which works only once the instance status is Completed.

Setting Up Recurring Entra ID Access Reviews for Guests architecture diagram 2

#Verification and evidence

After the pilot instance completes, pull the results. These are read-only.

1Get-MgIdentityGovernanceAccessReviewDefinition -AccessReviewScheduleDefinitionId "<DefinitionId>"
2Get-MgIdentityGovernanceAccessReviewDefinitionInstance -AccessReviewScheduleDefinitionId "<DefinitionId>"
3Get-MgIdentityGovernanceAccessReviewDefinitionInstanceDecision -AccessReviewScheduleDefinitionId "<DefinitionId>" -AccessReviewInstanceId "<InstanceId>" -All

The decisions call returns 100 items a page by default, which is why it uses -All. Retain three artefacts as audit evidence: the results CSV from the admin centre (open the review, then Results, then Download; for an earlier instance, pick it from Review history first), the change ticket showing sign-off, and a screenshot or Graph export of the definition’s recurrence and scope settings.

#Failure Modes and Common Traps

SymptomLikely causeFix
Review definition creation fails with a licensing-related errorTenant may lack the Microsoft Entra ID Governance licensing Microsoft documents for access reviewsCheck Microsoft’s current licensing documentation and your tenant’s licences before retrying
A group that has guests never appears in the reviewIt is a dynamic or role-assignable group, which the all-groups review leaves outChange a dynamic group’s rule instead; review a role-assignable group separately (that needs at least Privileged Role Administrator)
Denied guests are still members after the review endedAuto-apply is off, as in the pilot, and nobody applied the resultsSelect the instance under Review history and choose Apply
A group’s review went to someone who doesn’t know the projectThe group has no owner, so the fallback reviewer received itAdd an owner; owner changes apply from the next instance
Reviewers report no email receivedMailbox rule filtering governance notifications, or notifications disabledCheck mailbox rules and the review’s notification settings; point reviewers to My Access, which lists pending reviews
Auto-apply removes a guest still working (only after auto-apply has been enabled)A default decision of Deny with no reviewer response inside the windowRe-add the guest, then change the settings for future instances and follow up with the reviewer
The review starts hours later than expectedMicrosoft documents that start time can vary by a few hours because of system processingWait before assuming it has failed

#Rollback

If a cycle removes a guest who still needs access, restore it yourself; the next cycle will not. Re-add the guest to the group (this needs GroupMember.ReadWrite.All):

1Connect-MgGraph -Scopes "GroupMember.ReadWrite.All"
2New-MgGroupMember -GroupId "<GroupId>" -DirectoryObjectId "<GuestObjectId>"

A guest blocked by the 30-day block-then-remove action can be re-enabled by an administrator within those 30 days; after that the account is removed from the tenant permanently.

To change a definition without losing its history, update it rather than delete it. An update is a PUT that expects the full object with all writable properties, and it applies only to future instances. Save the current definition first:

Get-MgIdentityGovernanceAccessReviewDefinition -AccessReviewScheduleDefinitionId "<DefinitionId>" | ConvertTo-Json -Depth 10 | Out-File definition-backup.json

Then send the writable properties back with Set-MgIdentityGovernanceAccessReviewDefinition, using the saved as the base and changing only autoApplyDecisionsEnabled and defaultDecisionEnabled to false. Sending the saved values back undoes the edit.

To end a running instance early, use Stop-MgIdentityGovernanceAccessReviewDefinitionInstance or Stop on the review’s Results page. Stopping is not a brake: the instance is marked Completed, reviewers can no longer respond and it cannot be restarted. Decisions are applied when an instance stops, and auto-apply runs at that point when it is on, so treat stopping as applying. It does not stop the series; to prevent future instances, change the series end date.

To retire the pilot once the production review replaces it, download its results and confirm the ID is the pilot’s. In Graph the instances sit under the definition and the decisions under each instance, so treat deleting the definition as losing them too. Record it in the change ticket:

Remove-MgIdentityGovernanceAccessReviewDefinition -AccessReviewScheduleDefinitionId "<DefinitionId>"

Log every rollback action against the original change ticket, with a timestamp and the guest or reviewer affected.

#Operational Summary

You have scoped a recurring quarterly review to the guest members of every Microsoft 365 group, created it through the Microsoft Graph Identity Governance API with group owners as reviewers and a named fallback reviewer, listed the dynamic and role-assignable groups it cannot reach, piloted it on one group with results applied by hand, and confirmed at the group that a denied guest was removed and an approved one kept.

Deleting guest accounts stays a separate review. The deliverable is the definition’s GUID, the pilot’s results CSV and the signed change ticket, kept together as one evidence package.

Before closing, make sure you can answer two questions without notes: what happens to a guest whose reviewer does nothing for fourteen days (in this configuration, nothing changes), and what a denial removes (membership of that one group, not the guest’s account). Those are the questions your auditor or manager will ask first.

Evidence trail

Sources and verification

Primary documentation and external technical references used in this article.

  1. 01creating an access review in Microsoft Entra IDlearn.microsoft.com
  2. 02completing an access reviewlearn.microsoft.com
  3. 03Microsoft Graph PowerShell SDK getting started guidelearn.microsoft.com

About this page

Credited to

Dates

Published

Corrections

  • : Corrected during a review of published articles. Details
  • : Withdrawn. Details
  • : Corrected during a review of published articles. Details

Found this useful? Follow KBY for more like it.

Reader Interaction

Comments

Add a thoughtful note on Setting Up Recurring Entra ID Access Reviews for Guests. Comments are checked for spam and held for moderation before appearing.

Loading comments...

More from KBY that goes with this article.

Discover more

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

Build practical engineering skills.

Receive new lessons, learning paths, practical exercises and early-career guidance.