License & Subscription Issues

Find Office 365 F1 and E3 Licenses for Users with PowerShell

Jason MillerJason Miller Nov 20, 2026 869 views

Question details

An administrator needs to check whether users listed in a text file have Office 365 F1 or E3 licenses.

Find Office 365 F1 and E3 Licenses for Users with PowerShell
Product
Microsoft 365 and Microsoft Graph PowerShell
Device & OS
not provided
Scenario
Read user accounts from a text file and report the relevant license assignments for each account.
Observed behavior
The desired result is a per-user report showing whether each listed account has the selected F1 SKU or Office 365 E3 SKU.
Before you start

Create a users.txt file with one user principal name per line, and sign in with an account permitted to read users and subscription details. Microsoft Graph permissions may require administrator consent.

Solution 1Recommended

Check the listed users with Microsoft Graph PowerShell

Use this method to look up the tenant's license SKUs, check each user, and export the results to a CSV file.

Microsoft Graph PowerShell replaces the legacy MSOnline module and its Get-MsolUser cmdlet. Office 365 E3 uses the SKU part number ENTERPRISEPACK; ENTERPRISEPREMIUM is Office 365 E5, not E3.

Identify the F1 SKU from your tenant's subscription list rather than assuming its part number. The report checks license assignments, not the status of individual service plans.

1
Install and connect

In PowerShell, run Install-Module Microsoft.Graph -Scope CurrentUser if the module is not installed. Then run Connect-MgGraph -Scopes "User.Read.All","Organization.Read.All" and complete the sign-in and consent prompts.

2
Review the license SKUs

Run Get-MgSubscribedSku -All | Select-Object SkuPartNumber, SkuId to list the tenant's subscriptions. Note the exact SkuPartNumber for the F1 subscription you want to check.

3
Run the user report

In PowerShell, set the users.txt path in the script below, then run it and enter the F1 SKU part number when prompted. The script writes license-report.csv in the current directory. $path = '.\users.txt' $skus = @(Get-MgSubscribedSku -All) $f1Part = (Read-Host 'Enter the exact F1 SkuPartNumber').Trim() $f1 = $skus | Where-Object { $_.SkuPartNumber -eq $f1Part } | Select-Object -First 1 $e3 = $skus | Where-Object { $_.SkuPartNumber -eq 'ENTERPRISEPACK' } | Select-Object -First 1 if (-not $f1 -or -not $e3) { throw 'F1 or Office 365 E3 SKU not found in this tenant.' } $results = Get-Content $path | ForEach-Object { $_.Trim() } | Where-Object { $_ } | ForEach-Object { $upn = $_ try { $user = Get-MgUser -UserId $upn -Property 'id,userPrincipalName,assignedLicenses' -ErrorAction Stop $assigned = @($user.AssignedLicenses | ForEach-Object { $_.SkuId }) [PSCustomObject]@{ User = $upn; HasF1 = ($assigned -contains $f1.SkuId); HasE3 = ($assigned -contains $e3.SkuId); Error = '' } } catch { [PSCustomObject]@{ User = $upn; HasF1 = $null; HasE3 = $null; Error = $_.Exception.Message } } } $results | Export-Csv '.\license-report.csv' -NoTypeInformation -Encoding UTF8

4
Review the results

Open license-report.csv and check the HasF1, HasE3, and Error columns. For any error, verify the account in users.txt and your permissions, then run the report again.

Check the listed users with Microsoft Graph PowerShell
Assignment scope: Assigned licenses can include direct and group-based assignments. This report does not distinguish how a license was assigned.
Free Microsoft Office alternative

Review your license report in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar interface and compatibility with common Microsoft Office formats. Open the exported CSV in WPS Spreadsheets to review the results and continue working with familiar spreadsheet files. WPS does not perform the Microsoft 365 license lookup.

Open and review the exported per-user license report.Work with Microsoft Excel XLSX and XLS files for easier migration.Use a familiar spreadsheet interface to sort and inspect results.Access a free, lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

What should I put in users.txt?

Enter one user principal name per line, such as user@example.com. Set the $path variable in the script to the location of the file.

Which SKU represents Office 365 E3?

Office 365 E3 uses ENTERPRISEPACK. ENTERPRISEPREMIUM represents Office 365 E5.

How do I find the right F1 SKU?

Run Get-MgSubscribedSku -All | Select-Object SkuPartNumber, SkuId and identify the F1 subscription in your tenant. Enter its exact SkuPartNumber when the script prompts you.

Why does a user have an error instead of a license result?

The account may not exist under the supplied user principal name, or your account may not have sufficient permissions. Check the Error column, verify users.txt, and confirm access to read users and subscription details.

Does the report show whether individual services are enabled?

No. The script checks whether the selected license SKUs are assigned. It does not report the status of individual service plans within those licenses.