Skip to main content
Brixus
  1. Courses
  2. Certification Study Guides
  3. AB-650 Microsoft 365 Admin Study Guide & Exam Questions
  4. Read
AB-650 Microsoft 365 Admin Study Guide & Exam Questions
  • 1.Part 1: Microsoft 365 Tenant, Licensing and Workload Administration
    • 1. Organization Profile, Custom Themes and Sign-In Page Branding
    • 2. Custom Domains, Domain Verification and DNS Records
    • 3. Security & Privacy Settings: Idle Session Timeout, Password Expiration and Baseline Security Mode
    • 4. Group-Based Licensing, License Assignment Errors and Graph PowerShell Licensing
    • 5. Pay-As-You-Go Billing Policies, Budgets and Copilot Credit Capacity
    • 6. Microsoft 365 Copilot, Copilot Studio and Agent 365 License Requirements
    • 7. Microsoft 365 Backup Setup, Billing, Reports and Activity Logs
    • 8. Microsoft 365 Backup Policies, Recovery Windows and Full Workload Backup
    • 9. Microsoft 365 Backup Restore Points, Express Restore and Granular Restore
    • 10. Network Connectivity Insights, Office Locations and the Connectivity Test Tool
    • 11. Service Health Dashboard, Incident Notifications and Message Center
    • 12. User Mailboxes, Shared Mailboxes and Mailbox Permissions
    • 13. Teams, Channels, Team Owners and Members in the Teams Admin Center
    • 14. Copilot in Teams Meetings, Transcription and Live Captions Policies
    • 15. SharePoint Sites, Site Admins and Site Permissions
    • 16. SharePoint Advanced Management for Copilot: Oversharing Reports and Restricted Access Control
    • 17. Restricted Content Discovery, Microsoft Search Settings and Site Exclusions for Copilot
  • 2.Part 2: Entra Identity, Conditional Access, Defender for Office 365 and Purview Data Protection
  • 3.Part 3: Microsoft 365 Copilot, Agents, Agent 365 and AI Usage Monitoring

Your progress is not saved. You are trying this lesson as a guest, so your answers and progress are not saved.

1.4 Group-Based Licensing, License Assignment Errors and Graph PowerShell Licensing

In the Microsoft 365 admin center, start with the Licenses page when you know the product, or the Active users page when you know which users need a change. For large sets of users, group-based licensing lets you assign licenses through group membership instead of selecting users individually.

Choose an assignment path

Starting point

What you manage

How to make the change

Billing > Licenses

Users or groups for a selected product

Select the product and choose Assign licenses. Search for and select the users or groups, optionally change app and service access, then select Assign. To remove licenses, select the users or groups and choose Unassign licenses.

Users > Active users: one user

Product licenses for a selected user

Open Licenses and Apps. Expand Licenses, select or clear the relevant boxes, then select Save changes.

Users > Active users: multiple users

Product licenses for the selected users

Open Manage product licenses. To keep existing licenses and add more, choose Assign more: Keep the existing licenses and assign more > Next, select licenses, then save. To remove all licenses, choose Unassign all > Save changes, then select Done.

  • To assign licenses directly to users, you must be at least a License Administrator or User Administrator. You can also assign a license while adding a user.

  • From a product's Assign licenses panel, you can add up to 20 users and/or groups at a time. When assigning licenses to multiple users from Active users, all associated services are assigned by default; clear the boxes for services you don't want to grant.

  • To change apps and services without removing the product license, select the user's or group's row on Licenses, select or deselect the items, then choose Save and Close. Some services, such as Sway, are automatically assigned and don't need to be assigned individually.

  • A direct user assignment appears under the user's name on the product's assignments list. A group-based assignment appears under the group's name; use Teams & groups > Active teams & groups to see its members.

  • Licenses can show an aggregate total across subscriptions for the same product. For example, two Microsoft 365 Business Premium subscriptions with five and eight licenses appear as 13 licenses on Licenses, while Your products shows a separate row for each subscription.

Note

An admin can't assign or unassign licenses for a self-service purchase subscription bought by a user until the admin takes over the purchase or trial. If a subscription's limited cancellation window has passed, turn off recurring billing to cancel it at the end of its term. Cloud Solution Providers must use Licenses rather than Your products to manage assignments for certain products bought on a customer's behalf, such as perpetual software.

1. In the Microsoft 365 admin center, match each licensing task to the page that supports it.
  • Start with a product and select the groups that should receive its license.
  • Open one user's Licenses and Apps pane and clear a product license box.
  • See a separate row for each subscription, including subscriptions for the same product.
  • Inspect the membership of a group listed as a license assignee.
  • Active teams & groups
  • Active users
  • Licenses
  • Your products
Show answer and explanation
  • Start with a product and select the groups that should receive its license.: Licenses
  • Open one user's Licenses and Apps pane and clear a product license box.: Active users
  • See a separate row for each subscription, including subscriptions for the same product.: Your products
  • Inspect the membership of a group listed as a license assignee.: Active teams & groups

Licenses is the product-centered assignment page.

Active users lets you change licenses from the user's record.

Your products displays each subscription separately.

The product assignment lists the group name; Active teams & groups shows who belongs to it.

2. An admin is assigning another product license to selected users who must keep their existing licenses. In Active users > Manage product licenses, which choice meets that requirement?
  • Unassign all
  • Assign more: Keep the existing licenses and assign more
Show answer and explanation
  • Assign more: Keep the existing licenses and assign more

Assign more preserves existing licenses while letting the admin select additional licenses.

3. When an admin assigns a product license to multiple users from Active users, every associated service must remain enabled because services are assigned by default.
  • True
  • False
Show answer and explanation
  • False

The default is to assign all associated services, but the admin can clear the boxes for services the users should not receive.

Understand the impact of removing a license

  • Exchange Online holds the user's data for 30 days after license removal. After that grace period, the data is deleted and can't be recovered, except that content matching retention labels is retained for discovery. The user's mailbox is no longer searchable with tools such as Content Search or eDiscovery (Premium) after license removal.

  • Removing a license doesn't start OneDrive deletion right away, but the unlicensed OneDrive account becomes read-only after 60 days and is archived after 93 days. Since July 2026, outside EDU and government clouds, an account that stays unlicensed and unpaid can be deleted after 365 cumulative unpaid days. Deleting the user in the Microsoft 365 admin center or through Active Directory synchronization starts the OneDrive retention and deletion process.

  • Deleting a licensed user account makes its license immediately available for reassignment. With an Enterprise subscription such as Office 365 Enterprise E3, Exchange Online lets you preserve a deleted user's mailbox data using an inactive mailbox.

Users who still have Microsoft 365 productivity apps installed see activation errors when using them after license removal. Microsoft Support explains the resulting Unlicensed Product and activation errors in Office.

4. An administrator removes a user's Microsoft 365 license but leaves the user account in place. How does that differ from deleting the account when considering the user's OneDrive for Business files?
  • Removing the license alone doesn't delete the OneDrive for Business files right away; the account becomes read-only and is later archived.
  • Removing the license alone immediately deletes the OneDrive for Business files.
  • The OneDrive for Business files are subject to the Exchange Online grace period when a license is removed.
Show answer and explanation
  • Removing the license alone doesn't delete the OneDrive for Business files right away; the account becomes read-only and is later archived.

Removing a license doesn't start OneDrive deletion right away: the unlicensed account becomes read-only after 60 days and is archived after 93 days. Deleting the user, in the admin center or through Active Directory synchronization, starts the OneDrive retention and deletion process.

5. After a user's Microsoft 365 license is removed, the fact that Exchange Online temporarily holds the user's data means the mailbox is still searchable with Content Search.
  • True
  • False
Show answer and explanation
  • False

The Exchange Online grace period for holding data does not keep the user's mailbox searchable through Content Search after license removal.

Assign licenses through group membership

You can assign or unassign licenses for security groups and for Microsoft 365 groups that are security-enabled; distribution groups and Microsoft 365 groups without security enabled can't receive licenses. Assigning licenses requires at least a Groups Administrator, License Administrator, or User Administrator. The Microsoft Graph PowerShell SDK can also manage group licenses with Set-MgGroupLicense.

  • To assign a group license, go to Billing > Licenses, choose Assign licenses, find the group, and select the subscription to draw licenses from. If needed, use Turn apps and services on or off before confirming the assignment.

  • To unassign a group license, open the product on Licenses, use the group's three-dot menu to choose Unassign, then confirm.

  • Group-based licensing doesn't support nested groups: only users in the first-level group receive the license. Changes for large groups can take longer to process under high load.

  • Some services aren't available in all locations. When no user location is specified, group-based licensing uses the tenant location. In a multi-location organization, specify each user's location when creating the account.

  • You can assign licenses to a maximum of 20 groups at a time. Group license reprocessing attempts up to 20 users at a time. Successful and unsuccessful assignment lists show 999 users at a time; scroll to the bottom to load the next set.

Move a user without interrupting service

A new group assignment may still be processing when the user loses the license from the original group. To avoid that gap, keep the original membership until you've verified that the destination group's license has been applied.

  1. Add the user to the destination group.

  2. Confirm on the user's Licenses page that the new license has been applied.

  3. Remove the user from the original group.

Diagram: Add user to destination group, Confirm new license on user's Licenses page, Remove user from original group

6. A user needs to move between licensed groups without an interruption. The destination license may take time to apply. In what order should the administrator make the membership changes and verify the license?
  • Add the user to the destination group.
  • Confirm that the new license is applied on the user's Licenses page.
  • Remove the user from the original group.
Show answer
  1. Add the user to the destination group.
  2. Confirm that the new license is applied on the user's Licenses page.
  3. Remove the user from the original group.
7. If a user belongs only to a subgroup nested inside a licensed group, group-based licensing assigns the parent group's license to that user through the nested membership.
  • True
  • False
Show answer and explanation
  • False

Group-based licensing assigns licenses only to users in the first-level group; it does not traverse nested group membership.

8. If a user has no explicit usage location, group-based licensing evaluates service availability using the ____.
  • destination group
  • subscription name
  • tenant location
Show answer
  • If a user has no explicit usage location, group-based licensing evaluates service availability using the tenant location.

Diagnose failures before reprocessing

Direct assignment errors appear immediately. Group-based assignments are processed in the background: a failure is recorded on the user object and appears later in the admin portal. If an assignment finishes with a problem, use View errors and issues or open the product's Errors & Issues tab to see affected users, their status, the reason for failure, and available fixes.

  • For a product: In the Microsoft 365 admin center, open Billing > Licenses, select the product, open Errors & Issues, and select an affected user to see the details.

  • For all affected groups: In the Microsoft Entra admin center, open Billing > Licenses > Overview and select the information box if it appears. Open each group for details.

  • For a known group: In the Microsoft Entra admin center, open Groups, select the group, and use its error notification to find affected users and open their details.

Issue

Problem

Fix

Not enough licenses

There aren't enough available licenses for a product assigned to the group.

Buy more licenses, remove unused direct assignments, or free licenses from other groups or users.

Conflicting service plans

A plan conflicts with one already assigned through another product. For example, Office 365 E1 assigned directly and Office 365 E3 inherited from a group can introduce a conflict involving Exchange Online Plan 1 and Exchange Online Plan 2.

Disable one conflicting plan, remove the redundant direct license, or adjust the group license assignment.

Other products depend on this license

A plan can't be removed if another assigned product depends on it. For example, directly assigned Audio Conferencing depends on Skype for Business; removing the group license containing Skype for Business can fail or convert the inherited license to direct.

Remove or reassign the dependent service before removing the prerequisite.

Usage location isn't allowed

A user's usage location is missing or unsupported. Some services aren't available in all countries or regions.

Set the correct user location, remove users in unsupported locations from the licensed group, and populate user location during creation. Group-based licensing uses the tenant location if the user's location isn't set.

Duplicate proxy addresses

Exchange Online licensing can fail when two users have the same proxy address.

Correct the duplicate proxy address, then reprocess the user or group assignment.

Mail and ProxyAddresses attribute changes

Updating a license assignment can trigger recalculation of the user's mail and proxyAddresses attributes.

Review how proxy addresses are populated in Azure AD / Entra ID and correct the source of the change.

LicenseAssignmentAttributeConcurrencyException in audit logs

Multiple groups may try to assign the same license concurrently.

No action is required. Azure AD retries and resolves the issue automatically.

More than one product license assigned to a group

Azure AD tries to apply all of the group's products to each user. When one fails because of capacity, conflicts, or dependencies, other products might not be assigned either.

Inspect the affected users to determine which product caused the failure.

Licensed group is deleted

All group licenses must be removed before deletion. Dependencies or proxy address issues can block cleanup. An inherited Office 365 E3/E5 license with Skype for Business enabled might convert to a direct assignment for users who need it for directly assigned Audio Conferencing.

Check affected users for direct license assignments.

Products with prerequisites or add-ons

An add-on can require a service plan. For example, assigning Microsoft Workplace Analytics alone fails because it requires Exchange Online Plan 1 or Plan 2.

Assign the prerequisite and add-on in the same group. For example, pair Microsoft Workplace Analytics with Office 365 E3 with only Exchange Online Plan 2 enabled. Users who already receive E3 elsewhere can receive the add-on without using extra full-suite licenses.

Tip

Reprocess retries the assignment using the current configuration and available licenses. Correct the underlying issue first, then select the affected user or group on the product's Errors & Issues tab and choose Reprocess.

9. A group-based license assignment failure must appear immediately in the admin portal in the same way as a direct user assignment failure.
  • True
  • False
Show answer and explanation
  • False

Group-based assignment is processed in the background. The error is recorded on the user object and surfaced later in the portal.

10. In Microsoft 365 group-based licensing, match each failure condition to an appropriate response.
  • There aren't enough licenses available for the assigned product.
  • A service plan conflicts with a plan already assigned through another product.
  • Exchange Online licensing fails because two users have the same proxy address.
  • The audit log shows LicenseAssignmentAttributeConcurrencyException because multiple groups tried to assign the same license concurrently.
  • Correct the duplicate address, then reprocess.
  • Disable one of the conflicting plans.
  • Free unused licenses or buy more.
  • Let Azure AD retry automatically.
Show answer and explanation
  • There aren't enough licenses available for the assigned product.: Free unused licenses or buy more.
  • A service plan conflicts with a plan already assigned through another product.: Disable one of the conflicting plans.
  • Exchange Online licensing fails because two users have the same proxy address.: Correct the duplicate address, then reprocess.
  • The audit log shows LicenseAssignmentAttributeConcurrencyException because multiple groups tried to assign the same license concurrently.: Let Azure AD retry automatically.

An assignment can't use a license that isn't available.

Disabling a conflicting plan is one way to resolve the conflict.

Fix the duplicate before retrying the affected assignment.

Azure AD retries this concurrency issue automatically; no admin action is required.

11. A group supplies Skype for Business, which is required by a user's directly assigned Audio Conferencing service. What should the administrator do before removing the group-supplied prerequisite?
  • Remove or reassign the dependent Audio Conferencing service first.
  • Remove Skype for Business first and leave the dependent service unchanged.
  • Reprocess the assignment without changing the dependency.
Show answer and explanation
  • Remove or reassign the dependent Audio Conferencing service first.

Remove or reassign the dependent service first. Otherwise, removing the prerequisite can fail or convert the inherited license to a direct assignment.

12. A licensed group has several products assigned. One product fails to apply to a member because it has insufficient licenses. What should the administrator conclude about the other products assigned through the group?
  • All the other products are guaranteed to be assigned.
  • The other products might not be assigned either.
  • The failure proves a service plan conflict rather than a capacity problem.
Show answer and explanation
  • The other products might not be assigned either.

A failure for one product might prevent other products in the group from being assigned. Inspect the affected user to identify which product caused the failure.

Assign user licenses with Microsoft Graph PowerShell

For Microsoft 365 Enterprise and Office 365 Enterprise, the Microsoft Graph PowerShell SDK can assign or remove user licenses. Connect to the tenant first. Assigning or removing user licenses requires User.ReadWrite.All or another permission listed for the Assign license API; reading available tenant licenses requires Organization.Read.All.

Connect-MgGraph -Scopes User.ReadWrite.All, Organization.Read.All

Use Get-MgSubscribedSku to inspect licensing plans. Available licenses for a plan are ActiveUnits - WarningUnits - ConsumedUnits. To identify unlicensed accounts, query for users whose assigned-license count is zero.

Get-MgUser -Filter 'assignedLicenses/$count eq 0' -ConsistencyLevel eventual -CountVariable unlicensedUserCount -All

To narrow the query to unlicensed users synchronized from on-premises Active Directory Domain Services, add the synchronization filter.

Get-MgUser -Filter 'assignedLicenses/$count eq 0 and OnPremisesSyncEnabled eq true' -ConsistencyLevel eventual -CountVariable unlicensedUserCount -All -Select UserPrincipalName

Check usage location before assigning

To assign a license to a user account with PowerShell, UsageLocation must be set to a valid ISO 3166-1 alpha-2 country code, such as US for the United States or FR for France. A location is required when creating users in the admin center, but synchronized accounts don't have a location by default. Microsoft documents service availability considerations in About license restrictions.

This query finds member accounts without a UsageLocation value.

Get-MgUser -Select Id,DisplayName,Mail,UserPrincipalName,UsageLocation,UserType | where { $_.UsageLocation -eq $null -and $_.UserType -eq 'Member' }

Set the location with Update-MgUser.

$userUPN="<user sign-in name (UPN)>"
$userLoc="<ISO 3166-1 alpha-2 country code>"

Update-MgUser -UserId $userUPN -UsageLocation $userLoc
Update-MgUser -UserId "belindan@litwareinc.com" -UsageLocation US
Note

Without -All, Get-MgUser returns only the first 100 accounts.

13. An unlicensed account synchronized from on-premises Active Directory Domain Services has an empty UsageLocation. What must be done before assigning a license directly to that account with Microsoft Graph PowerShell?
  • Set UsageLocation on the account to a valid ISO 3166-1 alpha-2 country code.
  • Leave UsageLocation unset and rely on the group-based tenant-location fallback for the direct assignment.
  • Run the query with -All instead of setting UsageLocation.
Show answer and explanation
  • Set UsageLocation on the account to a valid ISO 3166-1 alpha-2 country code.

Direct license assignment through Microsoft Graph PowerShell requires a valid ISO 3166-1 alpha-2 code in UsageLocation. The tenant-location fallback described for group-based licensing doesn't replace this requirement.

14. A Microsoft Graph PowerShell query for missing user locations can be relied on to examine all tenant accounts without using -All in Get-MgUser.
  • True
  • False
Show answer and explanation
  • False

Without -All, Get-MgUser returns only the first 100 accounts, so the query can miss accounts.

Add licenses and control service access

Use Set-MgUserLicense to add a license by SkuId. An empty RemoveLicenses array means the command isn't requesting any removals.

Set-MgUserLicense -UserId $userUPN -AddLicenses @{SkuId = "<SkuId>"} -RemoveLicenses @()

Find the SkuId for Microsoft 365 E5 by looking up its SkuPartNumber, SPE_E5, then pass the ID to the assignment command.

$e5Sku = Get-MgSubscribedSku -All | Where SkuPartNumber -eq 'SPE_E5'
Set-MgUserLicense -UserId "belindan@litwareinc.com" -AddLicenses @{SkuId = $e5Sku.SkuId} -RemoveLicenses @()

To add Microsoft 365 E5 and Enterprise Mobility + Security E5 (EMSPREMIUM) together, pass both SKU IDs in the AddLicenses array.

$e5Sku = Get-MgSubscribedSku -All | Where SkuPartNumber -eq 'SPE_E5'
$e5EmsSku = Get-MgSubscribedSku -All | Where SkuPartNumber -eq 'EMSPREMIUM'
$addLicenses = @(
    @{SkuId = $e5Sku.SkuId},
    @{SkuId = $e5EmsSku.SkuId}
)

Set-MgUserLicense -UserId "belinda@litwareinc.com" -AddLicenses $addLicenses -RemoveLicenses @()

Use DisabledPlans with service plan IDs to assign a product without granting particular services. This example assigns Microsoft 365 E5 with Microsoft Bookings and Customer Lockbox turned off.

$e5Sku = Get-MgSubscribedSku -All | Where SkuPartNumber -eq 'SPE_E5'
$disabledPlans = $e5Sku.ServicePlans | `
    Where ServicePlanName -in ("LOCKBOX_ENTERPRISE", "MICROSOFTBOOKINGS") | `
    Select -ExpandProperty ServicePlanId

$addLicenses = @(
    @{
        SkuId = $e5Sku.SkuId
        DisabledPlans = $disabledPlans
    }
)

Set-MgUserLicense -UserId "belinda@litwareinc.com" -AddLicenses $addLicenses -RemoveLicenses @()

When turning off Sway and Forms on an existing Microsoft 365 E5 assignment, retrieve the plans that are already disabled, combine their IDs with the new IDs, and remove duplicates before submitting DisabledPlans.

$userLicense = Get-MgUserLicenseDetail -UserId "belinda@litwareinc.com"
$userDisabledPlans = $userLicense.ServicePlans | `
    Where ProvisioningStatus -eq "Disabled" | `
    Select -ExpandProperty ServicePlanId

$e5Sku = Get-MgSubscribedSku -All | Where SkuPartNumber -eq 'SPE_E5'
$newDisabledPlans = $e5Sku.ServicePlans | `
    Where ServicePlanName -in ("SWAY", "FORMS_PLAN_E5") | `
    Select -ExpandProperty ServicePlanId

$disabledPlans = ($userDisabledPlans + $newDisabledPlans) | Select -Unique

$addLicenses = @(
    @{
        SkuId = $e5Sku.SkuId
        DisabledPlans = $disabledPlans
    }
)

Set-MgUserLicense -UserId "belinda@litwareinc.com" -AddLicenses $addLicenses -RemoveLicenses @()

To keep existing disabled plans in other subscriptions unchanged, this version filters the combined IDs to the plans belonging to the target Microsoft 365 E5 SKU.

$userLicense = Get-MgUserLicenseDetail -UserId belinda@litwareinc.com

$userDisabledPlans = $userLicense.ServicePlans | Where-Object ProvisioningStatus -eq "Disabled" | Select -ExpandProperty ServicePlanId

$e5Sku = Get-MgSubscribedSku -All | Where SkuPartNumber -eq 'SPE_E5'

$newDisabledPlans = $e5Sku.ServicePlans | Where ServicePlanName -in ("SWAY", "FORMS_PLAN_E5") | Select -ExpandProperty ServicePlanId

$disabledPlans = ($userDisabledPlans + $newDisabledPlans) | Select -Unique

$result=@()
$allPlans = $e5Sku.ServicePlans | Select -ExpandProperty ServicePlanId

foreach($disabledPlan in $disabledPlans)
{
    foreach($allPlan in $allPlans)
    {
        if($disabledPlan -eq $allPlan)
        {
            $property = @{
                Disabled = $disabledPlan
            }
        }
     }
     $result += New-Object psobject -Property $property
}

$finalDisabled = $result | Select-Object -ExpandProperty Disabled

$addLicenses = @(
    @{
        SkuId = $e5Sku.SkuId
        DisabledPlans = $finalDisabled
    }
)

Set-MgUserLicense -UserId belinda@litwareinc.com -AddLicenses $addLicenses -RemoveLicenses @()

Copy an assignment or change licensing plans

To copy another user's license assignment, retrieve the source user's AssignedLicenses and pass it as AddLicenses for the target user.

$mgUser = Get-MgUser -UserId "belindan@litwareinc.com" -Property AssignedLicenses
Set-MgUserLicense -UserId "jamesp@litwareinc.com" -AddLicenses $mgUser.AssignedLicenses -RemoveLicenses @()

In this Microsoft 365 E3-to-E5 example, look up both SKU IDs, remove the E3 license, and assign E5.

$e3Sku = Get-MgSubscribedSku -All | Where SkuPartNumber -eq 'SPE_E3'
$e5Sku = Get-MgSubscribedSku -All | Where SkuPartNumber -eq 'SPE_E5'

# Unassign E3
Set-MgUserLicense -UserId "belindan@litwareinc.com" -AddLicenses @{} -RemoveLicenses @($e3Sku.SkuId)
# Assign E5
Set-MgUserLicense -UserId "belindan@litwareinc.com" -AddLicenses @{SkuId = $e5Sku.SkuId} -RemoveLicenses @()

Verify the change with Get-MgUserLicenseDetail.

Get-MgUserLicenseDetail -UserId "belindan@litwareinc.com"
15. Match each Microsoft Graph PowerShell licensing task to the cmdlet that performs it.
  • Inspect tenant licensing plans and the units needed to calculate availability.
  • Set a user's UsageLocation.
  • Add a license by SKU ID or remove an assigned license.
  • Verify a user's licensing plan after changing the assignment.
  • Get-MgSubscribedSku
  • Get-MgUserLicenseDetail
  • Set-MgUserLicense
  • Update-MgUser
Show answer and explanation
  • Inspect tenant licensing plans and the units needed to calculate availability.: Get-MgSubscribedSku
  • Set a user's UsageLocation.: Update-MgUser
  • Add a license by SKU ID or remove an assigned license.: Set-MgUserLicense
  • Verify a user's licensing plan after changing the assignment.: Get-MgUserLicenseDetail

Get-MgSubscribedSku retrieves the subscribed licensing plans and their units.

Update-MgUser sets the UsageLocation user property.

Set-MgUserLicense takes AddLicenses and RemoveLicenses inputs.

Get-MgUserLicenseDetail retrieves details of the user's licenses.

16. An administrator is updating a Microsoft 365 E5 assignment to turn off Sway and Forms while keeping plans that are already disabled turned off. How should the administrator build DisabledPlans?
  • Submit only the two newly disabled plan IDs.
  • Submit the existing disabled plan IDs without adding Sway or Forms.
  • Combine the existing and newly disabled plan IDs, then remove duplicates.
Show answer and explanation
  • Combine the existing and newly disabled plan IDs, then remove duplicates.

Combine the existing disabled plan IDs with the IDs for Sway and Forms and remove duplicates before submitting the list.

Report on assignment errors and inheritance

To find licensed groups with assignment errors, collect their member counts and error counts, then display only the groups with a nonzero error count.

# Get all groups that have assigned licenses
$groups = Get-MgGroup -All -Property DisplayName, Id, AssignedLicenses | 
    Where-Object { $_.AssignedLicenses -ne $null } | 
    Select-Object DisplayName, Id, AssignedLicenses

# Initialize an array to store group information
$groupInfo = @()

# Iterate over each group
foreach ($group in $groups) {
    $groupId = $group.Id
    $groupName = $group.DisplayName

    # Get count of the group's members and members with license errors
    $totalCount = (Get-MgGroupMember -GroupId $GroupId -All).count
    $licenseErrorCount = (Get-MgGroupMemberWithLicenseError -GroupId $groupId).count

    # Create a custom object with the group's information and counts
    $groupInfo += [PSCustomObject]@{
        GroupName         = $groupName
        GroupId           = $groupId
        TotalUserCount    = $totalCount
        LicenseErrorCount = $licenseErrorCount
    }
}

# Display the groups with licensing errors
$groupInfo | Where-Object { $_.LicenseErrorCount -gt 0 } | Format-Table -Property GroupName, GroupId, TotalUserCount, LicenseErrorCount

A user can have licensing errors from more than one group. This script uses LicenseAssignmentStates to report errors for one group: it keeps states whose AssignedByGroup matches the target group and whose Error is not None.

# Import necessary modules
Import-Module Microsoft.Graph.Users
Import-Module Microsoft.Graph.Groups

# Specify the group ID you want to check
$groupId = "ENTER-YOUR-GROUP-ID-HERE"

# Authenticate to Microsoft Graph
Connect-MgGraph -Scopes "Group.Read.All", "User.Read.All"

# Get the specified group
$group = Get-MgGroup -GroupId $groupId -Property DisplayName, Id, AssignedLicenses
Write-Host "Checking license errors for group: $($group.DisplayName)" -ForegroundColor Cyan

# Initialize output array
$groupInfoArray = @()

# Get all members from the group and check their license status
$groupMembers = Get-MgGroupMember -GroupId $group.Id -All
$errorCount = 0

# Process each member
foreach ($memberId in $groupMembers.Id) {
    # Get user details
    $user = Get-MgUser -UserId $memberId -Property DisplayName, Id, LicenseAssignmentStates

    # Check for license errors
    $licenseErrors = $user.LicenseAssignmentStates | Where-Object { 
        $_.AssignedByGroup -eq $groupId -and $_.Error -ne "None" 
    }

    if ($licenseErrors) {
        $errorCount++
        $userInfo = [PSCustomObject]@{
            GroupName = $group.DisplayName
            GroupId = $group.Id
            UserName = $user.DisplayName
            UserId = $user.Id
            Error = ($licenseErrors.Error -join ", ")
            ErrorSubcode = ($licenseErrors.ErrorSubcode -join ", ")
        }
        $groupInfoArray += $userInfo
    }
}

# Summary
Write-Host "Found $errorCount users with license errors in group $($group.DisplayName)" -ForegroundColor Yellow

# Format the output and print it to the console

if ($groupInfoArray.Length -gt 0) {
    $groupInfoArray | Format-Table -AutoSize
}
else {
    Write-Host "No License Errors"
}

To distinguish direct assignments from inherited ones, inspect AssignedByGroup in each assignment state. A null value represents a direct assignment; otherwise, look up the group. This script groups the assignment methods by user and SKU and exports them to a CSV file.

# Retrieve all SKUs in the tenant
$skus = Get-MgSubscribedSku -All | Select-Object SkuId, SkuPartNumber

# Retrieve all users in the tenant with required properties
$users = Get-MgUser -All -Property AssignedLicenses, LicenseAssignmentStates, DisplayName, Id, UserPrincipalName

# Initialize an empty array to store the user license information
$allUserLicenses = @()

foreach ($user in $users) {
    # Initialize a hash table to track all assignment methods for each license
    $licenseAssignments = @{}

    # Loop through license assignment states
    foreach ($assignment in $user.LicenseAssignmentStates) {
        $skuId = $assignment.SkuId
        $assignedByGroup = $assignment.AssignedByGroup
        $assignmentMethod = if ($assignedByGroup -ne $null) {
            # If the license was assigned by a group, get the group name
            $group = Get-MgGroup -GroupId $assignedByGroup
            if ($group) { $group.DisplayName } else { "Unknown Group" }
        } else {
            # If the license was assigned directly by the user
            "User"
        }

        # Ensure all assignment methods are captured
        if (-not $licenseAssignments.ContainsKey($skuId)) {
            $licenseAssignments[$skuId] = @($assignmentMethod)
        } else {
            $licenseAssignments[$skuId] += $assignmentMethod
        }
    }

    # Process assigned licenses
    foreach ($skuId in $licenseAssignments.Keys) {
        # Get SKU details from the pre-fetched list
        $sku = $skus | Where-Object { $_.SkuId -eq $skuId } | Select-Object -First 1
        $skuPartNumber = if ($sku) { $sku.SkuPartNumber } else { "Unknown SKU" }

        # Sort and join the assignment methods
        $assignmentMethods = ($licenseAssignments[$skuId] | Sort-Object -Unique) -join ", "

        # Construct a custom object to store the user's license information
        $userLicenseInfo = [PSCustomObject]@{
            UserId = $user.Id
            UserDisplayName = $user.DisplayName
            UserPrincipalName = $user.UserPrincipalName
            SkuId = $skuId
            SkuPartNumber = $skuPartNumber
            AssignedBy = $assignmentMethods
        }

        # Add the user's license information to the array
        $allUserLicenses += $userLicenseInfo
    }
}

# Export the results to a CSV file
$path = Join-path $env:LOCALAPPDATA ("UserLicenseAssignments_" + [string](Get-Date -UFormat %Y%m%d) + ".csv")
$allUserLicenses | Export-Csv $path -Force -NoTypeInformation

# Display the location of the CSV file
Write-Host "CSV file generated at: $((Get-Item $path).FullName)"
17. A user has Microsoft 365 licensing errors from multiple groups. When using LicenseAssignmentStates to report failures attributable to one target group, which states belong in the report?
  • Every state with an error, regardless of AssignedByGroup.
  • Every state for the target group, even when Error is None.
  • Only states where AssignedByGroup is the target group and Error is not None.
Show answer and explanation
  • Only states where AssignedByGroup is the target group and Error is not None.

Matching AssignedByGroup limits results to the target group. Excluding Error values of None leaves the states that report failures.

18. When interpreting a Microsoft Graph PowerShell license assignment state, a null AssignedByGroup indicates that the license was assigned directly rather than inherited through a group.
  • True
  • False
Show answer and explanation
  • True

A group-inherited assignment identifies the group in AssignedByGroup; a direct assignment has no group in that property.

Extra questions

The Entra tenant contoso.com holds the users below. Group2 belongs to Group1, and an Office 365 Enterprise E3 license is assigned to Group1.

NameUsage locationMembership
User1United StatesGroup1, Group2
User2Not setGroup2
User3Not setGroup1
User4CanadaGroup1
19. How many Office 365 E3 licenses become assigned as a result?
  • 1
  • 2
  • 3
  • 4
Show answer and explanation
  • 3

Nested groups are not honored: when a licensed group contains another group, only direct members of the licensed group obtain the license. Membership of Group2 in Group1 therefore passes nothing on, so User2, who is only in Group2, gets nothing, while User1 is covered as a direct member of Group1. A license also requires a usage location, but group-based licensing falls back to the tenant location for a user without one, so User3 is still licensed. User1, User3, and User4 are direct members of Group1, totaling three assigned licenses. Counting four would assume licensing flows through the nested group, while counting fewer would wrongly exclude User3 for the missing location.

The subscription holds the users below.

NameDepartment
User1Human resources
User2Research
User3Human resources
User4Marketing

Licensing must satisfy every goal below.

  • Give every user Office 365 E3 without the Power Automate option.
  • Give every user Enterprise Mobility + Security E5.
  • Give only research-department users Power BI Pro.
  • Give only marketing-department users Visio Plan 2.
20. What is the smallest number of deployment groups needed to meet all the goals?
  • 1
  • 2
  • 3
  • 4
  • 5
Show answer and explanation
  • 3

One group can hold several product assignments, and each assignment can switch individual apps and services off. A single all-users group can therefore carry Office 365 E3 with the Power Automate for Office 365 plan switched off plus Enterprise Mobility + Security E5. Every member of a licensed group receives all of that group's licenses, so Power BI Pro and Visio Plan 2 each require a dedicated group limited to research users and to marketing users respectively. Membership in several licensed groups combines, so research users gain the common licenses plus Power BI Pro. Using one or two groups cannot isolate the department-only products, while four or five groups would work but exceed the minimum.

A security group called Group1 has received a Microsoft 365 E3 license. User1 is outside Group1 and cannot reach E3 capabilities. User1 must obtain full E3 capability.

21. Which two separate moves each give User1 complete access to the Microsoft 365 E3 features?
  • Add User1 to Group1.
  • Assign a Conditional Access policy to Group1.
  • Assign a Conditional Access policy to User1.
  • Assign a license to User1.
Show answer and explanation
  • Add User1 to Group1.
  • Assign a license to User1.

Capability follows license possession. Adding User1 to the licensed group triggers automatic group-based assignment, including for later joiners, while direct assignment from Active users or Licenses grants the same product immediately. Either path alone resolves access when stock exists. Conditional Access rules gate sign-in conditions such as multifactor or device compliance and can deny entry, but they never confer a product license.

You have a Microsoft 365 E5 subscription with the groups below. You intend to create 10 new users and use group-based licensing to give each one a Microsoft 365 E5 license.

NameTypeRole assignments allowedSecurity enabled
Group1SecurityNoYes
Group2Microsoft 365NoNo
Group3DistributionNot applicableNot applicable
22. Add the new users to ____ and assign the license by using ____.

Choose the group and the portal for licensing.

  • Group1
  • Group2
  • Group3
  • The Microsoft 365 admin center
  • The Microsoft Entra admin center
  • The Microsoft Purview portal
Show answer
  • Add the new users to Group1 and assign the license by using The Microsoft 365 admin center.

The subscription holds Group1 and Group2. User-to-group links are as follows.

NameGroup membership
User1Group1
User2Group1, Group2
User3Group2

Licenses granted directly to users are as follows.

UserLicenseDisabled plan
User1Microsoft 365 E5None
User2NoneNone
User3Microsoft 365 E5Microsoft Planner

Licenses granted to the groups are as follows.

NameLicenseDisabled plan
Group1Microsoft 365 E5Microsoft Planner
Group2Microsoft 365 E5None
23. User1 has a license for Microsoft Planner.
  • True
  • False
Show answer and explanation
  • True

User1 holds a direct Microsoft 365 E5 grant with every plan enabled, which includes Planner. The grant inherited from Group1 omits Planner, but an omission in one assignment does not take away what another assignment provides.

24. User2 has a license for Microsoft Planner.
  • True
  • False
Show answer and explanation
  • True

User2 has no direct grant. The grant from Group1 turns Planner off, but the grant from Group2 enables all plans, including Planner, so Planner is available.

25. User3 has a license for Microsoft Planner.
  • True
  • False
Show answer and explanation
  • True

User3 has a direct grant that turns Planner off, but also inherits Microsoft 365 E5 with all plans enabled from Group2, which supplies Planner. A user needing the same product from several assignments consumes only one license while gaining the plans enabled in any assignment.

Your Microsoft 365 E5 tenant contains the following users and groups with the shown memberships and licenses. Decide which objects can be deleted.

NameMember ofAssigned license
User1Group1Microsoft 365 E5
User2Group2None
User3NoneMicrosoft 365 E5
User4NoneNone
NameMember ofAssigned license
Group1NoneNone
Group2Group3Microsoft 365 E5
Group3Group4None
Group4NoneMicrosoft 365 E5
26. Users you can delete: ____ Groups you can delete: ____
  • Group1 and Group3 only
  • Group1 only
  • Group1, Group2, Group3, and Group4
  • Group4 only
  • User1, User2, User3, and User4
  • User2 and User4 only
  • User3 and User4 only
  • User4 only
Show answer
  • Users you can delete: User1, User2, User3, and User4 Groups you can delete: Group1 and Group3 only
27. You have a Microsoft 365 E5 subscription tied to the Entra tenant contoso.com. You buy 100 Teams Domestic Calling Plan add-on licenses. Members of a group named Voice must get the add-on automatically. What should you do?
  • Assign the licenses from the Licenses page in the Microsoft 365 admin center.
  • Change the Voice group settings in the Microsoft Entra admin center.
  • Change the Voice group settings in the Microsoft 365 admin center.
Show answer and explanation
  • Assign the licenses from the Licenses page in the Microsoft 365 admin center.

Automatic licensing through membership is group-based licensing, handled on the Licenses page of the Microsoft 365 admin center under Billing. You choose Assign licenses, locate the Voice group, pick the subscription to draw from, and assign. Current members receive the add-on, later joiners receive it automatically, and members who depart lose it. A Groups Administrator, License Administrator, or User Administrator role is required. The Microsoft Entra admin center no longer assigns licenses in its interface; it only shows license detail and errors. A group's own settings under Teams and groups only control name, description, address, membership, and mail options, not licenses.

A user User1@contoso.com was recently created with usage location United States. You must assign an Office 365 E3 license with Microsoft Bookings left out.

28. Complete the command: ____ -Scopes User.ReadWrite.All, Organization.Read.All $E3 = ____ | Where SkuPartNumber -eq 'EnterprisePack' $disabledPlans = $E3.ServicePlans | Where ServicePlanName -in ("MICROSOFTBOOKINGS") | Select -ExpandProperty ServicePlanId $LicenseOptions = @{ SkuId = $E3.SkuId; DisabledPlans = $disabledPlans } ____ -UserId User1@contoso.com -AddLicenses $LicenseOptions -RemoveLicenses @()

Complete the PowerShell licensing script.

  • Connect-AzureAD
  • Connect-MgGraph
  • Connect-MSOLService
  • Get-AzureADUser
  • Get-MgSubscribedSku
  • Get-MSOLAccountSKU
  • Set-AzureADUser
  • Set-MgUserLicense
  • Set-MSOLUser
Show answer
  • Complete the command: Connect-MgGraph -Scopes User.ReadWrite.All, Organization.Read.All $E3 = Get-MgSubscribedSku | Where SkuPartNumber -eq 'EnterprisePack' $disabledPlans = $E3.ServicePlans | Where ServicePlanName -in ("MICROSOFTBOOKINGS") | Select -ExpandProperty ServicePlanId $LicenseOptions = @{ SkuId = $E3.SkuId; DisabledPlans = $disabledPlans } Set-MgUserLicense -UserId User1@contoso.com -AddLicenses $LicenseOptions -RemoveLicenses @()

You hold a Microsoft 365 E5 subscription with the groups below visible on the Entra ID All groups view.

NameGroup typeSecurity enabledRole assignments allowed
Group1Microsoft 365NoNo
Group2Microsoft 365YesNo
Group3SecurityYesNo
Group4SecurityYesYes
29. To which of these groups can Microsoft 365 E5 licenses be assigned?
  • Group1 and Group2 only
  • Group2 and Group3 only
  • Group3 and Group4 only
  • Group1, Group2, and Group3 only
  • Group2, Group3, and Group4 only
Show answer and explanation
  • Group2, Group3, and Group4 only

Group-based licensing is permitted only for security groups and for Microsoft 365 groups that are security-enabled. The security flag, not the type name alone, controls eligibility. Group1 is a Microsoft 365 group without security enabled, so it cannot take licenses. Group2 is a security-enabled Microsoft 365 group, so it can. Group3 is a security group, so it can. Group4 is a security group that also permits Entra role assignment; role-assignable groups must be security-enabled and that capability does not prevent license assignment, so it can also take licenses.

Security & Privacy Settings: Idle Session Timeout, Password Expiration and Baseline Security ModePage 4 of 72Pay-As-You-Go Billing Policies, Budgets and Copilot Credit Capacity