Account Security Problems

Export Microsoft 365 SSPR-Registered Users and Mobile Numbers with PowerShell

John WilsonJohn Wilson Nov 14, 2026 868 views

Question details

Export users registered for Microsoft 365 self-service password reset with their mobile authentication numbers and profile details.

Export Microsoft 365 SSPR-Registered Users and Mobile Numbers with PowerShell
Product
Microsoft Entra ID and Microsoft 365
Device & OS
not provided
Scenario
An administrator wants a CSV report of SSPR-registered users with display names, mobile numbers, email addresses, and departments.
Observed behavior
The desired report contains registered users and their available profile and mobile authentication details.
Before you start

Sign in with an account authorized to read authentication registration reports, user profiles, and authentication methods, and obtain admin consent for the required Microsoft Graph permissions. Check that your tenant has the licensing required for the authentication methods registration report.

Solution 1Recommended

Export SSPR registration and mobile authentication data with Microsoft Graph

Use the Microsoft Graph PowerShell SDK to filter the registration report and retrieve each registered user's profile and mobile authentication number.

The older Get-MsolUser approach uses the retired MSOnline module. Expanding StrongAuthenticationUserDetails alone does not filter users by SSPR registration status, so use the Microsoft Graph registration report instead.

The mobile number in this export comes from the user's authentication phone methods, not necessarily the mobile phone field in their directory profile. A blank value means no mobile authentication method was returned.

1
Install the Graph authentication module

Open PowerShell and run: Install-Module Microsoft.Graph.Authentication -Scope CurrentUser

2
Connect with the required permissions

Run: Connect-MgGraph -Scopes 'AuditLog.Read.All','User.Read.All','UserAuthenticationMethod.Read.All'. Sign in and grant consent when prompted; the account also needs an appropriate Microsoft Entra administrative role.

3
Run the export script

Replace the CSV path, then paste and run the following script in PowerShell: $url = 'https://graph.microsoft.com/v1.0/reports/authenticationMethods/userRegistrationDetails' $registered = @() do { $response = Invoke-MgGraphRequest -Method GET -Uri $url -ErrorAction Stop $registered += @($response.value | Where-Object { $_.isSsprRegistered -eq $true }) $url = $response.'@odata.nextLink' } while ($url) $results = foreach ($registration in $registered) { $id = $registration.id $userUrl = 'https://graph.microsoft.com/v1.0/users/{0}?$select=displayName,mail,department' -f $id $phoneUrl = 'https://graph.microsoft.com/v1.0/users/{0}/authentication/phoneMethods' -f $id $user = Invoke-MgGraphRequest -Method GET -Uri $userUrl -ErrorAction Stop $phones = Invoke-MgGraphRequest -Method GET -Uri $phoneUrl -ErrorAction Stop $mobile = $phones.value | Where-Object { $_.phoneType -eq 'mobile' } | Select-Object -First 1 [PSCustomObject]@{ DisplayName = $user.displayName PhoneNumber = $mobile.phoneNumber Email = $user.mail Department = $user.department } } $results | Export-Csv -Path 'C:\path\sspr-users.csv' -NoTypeInformation

4
Review the CSV

Open the CSV file at the path supplied to Export-Csv and check the rows and columns. If access is denied, verify the Graph permissions, admin consent, and the signed-in account's role before rerunning the script.

Protect the exported data: The CSV contains personal contact and authentication information. Store it in an access-controlled location and share it only with authorized people. Registration report data may not reflect changes immediately.
Free Microsoft Office alternative

Review your SSPR export in WPS Spreadsheets

After exporting the report with Microsoft Graph, use the free, lightweight WPS Office suite to review and organize it. Its familiar interface and Microsoft Office format compatibility make it easy to move existing spreadsheet work into WPS.

Open and review the exported SSPR CSV reportCompatible with Microsoft Excel formats, including XLSXUse familiar spreadsheet tools to sort and filter report columnsFree and lightweight for everyday office tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why should I use Microsoft Graph instead of Get-MsolUser?

The MSOnline module used by Get-MsolUser is retired. Microsoft Graph provides the authentication methods registration report, including the isSsprRegistered property used to select registered users.

Why is a registered user's phone number blank?

The script reads the mobile authentication phone method. A user can be registered for SSPR without that method, and the directory profile's mobile phone field may contain a different value.

What should I check if the command returns an access error?

Check admin consent for AuditLog.Read.All, User.Read.All, and UserAuthenticationMethod.Read.All. Also verify that the signed-in account has an appropriate Microsoft Entra role and that the tenant meets the report's licensing requirements.

Why are there no rows in the export?

The registration report may contain no users with isSsprRegistered set to true. Check the authentication methods registration report in the Microsoft Entra admin center and allow time for recent registration changes to appear.

Can I open the CSV in WPS Office?

Yes. In WPS Spreadsheets, use Open to select the exported CSV. You can review and filter the report, then save a copy in XLSX format if needed.